/* ════════════════════════════════════
   YANIS DUTILLEUL — style.css
   Palette : Lost Ark (rouge, doré, fond sombre)
════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:   #b3001b;
  --gold:      #ffd700;
  --accent:    #ff6f00;
  --bg:        #120f13; /* Dark background */
  --card:      #1a151a; /* Slightly lighter dark for cards */
  --input-bg:  #251f25; /* Even lighter dark for inputs */
  --border:    #b3001b;
  --text:      #e6e0e6;
  --muted:     #a09098;
  --shadow:    rgba(0,0,0,0.7); /* Dark shadow */
  --cinzel:    'Cinzel', serif;
  --oswald:    'Oswald', sans-serif;
  --alice:     'Alice', serif;

  /* Alpha colors based on primary */
  --primary-alpha-03: rgba(179,0,27,.03);
  --primary-alpha-04: rgba(179,0,27,.04);
  --primary-alpha-06: rgba(179,0,27,.06);
  --primary-alpha-08: rgba(179,0,27,.08);
  --primary-alpha-10: rgba(179,0,27,.1);
  --primary-alpha-12: rgba(179,0,27,.12);
  --primary-alpha-15: rgba(179,0,27,.15);
  --primary-alpha-20: rgba(179,0,27,.2);
  --primary-alpha-25: rgba(179,0,27,.25);
  --primary-alpha-30: rgba(179,0,27,.3);
  --primary-alpha-35: rgba(179,0,27,.35);
  --primary-alpha-40: rgba(179,0,27,.4);
  --primary-alpha-45: rgba(179,0,27,.45);
  --primary-alpha-80: rgba(179,0,27,.8);

  /* Alpha colors based on gold */
  --gold-alpha-08: rgba(255,215,0,.08);
  --gold-alpha-10: rgba(255,215,0,.1);
  --gold-alpha-15: rgba(255,215,0,.15);
  --gold-alpha-20: rgba(255,215,0,.2);
  --gold-alpha-25: rgba(255,215,0,.25);
  --gold-alpha-30: rgba(255,215,0,.3);
  --gold-alpha-35: rgba(255,215,0,.35);
  --gold-alpha-60: rgba(255,215,0,.6);

  /* Alpha colors based on accent */
  --accent-alpha-08: rgba(255,111,0,.08);
  --accent-alpha-10: rgba(255,111,0,.1);
  --accent-alpha-15: rgba(255,111,0,.15);
  --accent-alpha-25: rgba(255,111,0,.25);

  /* Alpha colors based on text/white */
  --text-alpha-06: rgba(255,255,255,.06);
  --text-alpha-08: rgba(255,255,255,.08);
  --text-alpha-10: rgba(255,255,255,.1);
  --text-alpha-90: rgba(255,255,255,.9);

  /* Alpha colors based on black */
  --black-alpha-15: rgba(0,0,0,.15);
  --black-alpha-20: rgba(0,0,0,.2);
  --black-alpha-30: rgba(0,0,0,.3);
  --black-alpha-50: rgba(0,0,0,.5);
  --black-alpha-60: rgba(0,0,0,.6);
  --black-alpha-70: rgba(0,0,0,.7);
  --black-alpha-80: rgba(0,0,0,.8);

  /* Specific component colors */
  --body-overlay-gradient: radial-gradient(ellipse 80% 60% at 50% 0%, var(--primary-alpha-08) 0%, transparent 60%);
  --nav-bg: #1a1418ee;
  --nav-shadow: 0 2px 24px var(--primary-alpha-30);
  --nav-link-color: #d4c8cc;
  --nav-link-hover-bg: var(--primary-alpha-10);
  --cta-text-color: #fff;

  --hero-bg-gradient: linear-gradient(180deg, var(--bg) 0%, var(--card) 100%);
  --hero-halo-gradient: radial-gradient(circle, var(--primary-alpha-12) 0%, transparent 65%);
  --hero-grid-image: linear-gradient(var(--primary-alpha-04) 1px, transparent 1px), linear-gradient(90deg, var(--primary-alpha-04) 1px, transparent 1px);

  --section-tag-bg: var(--primary-alpha-10);

  --info-table-border: var(--primary-alpha-30);
  --info-row-border: var(--text-alpha-06);
  --track-bg: var(--text-alpha-08);

  --soft-skills-border: var(--primary-alpha-35);
  --interests-border: var(--text-alpha-08);

  --proj-item-border: var(--primary-alpha-25);
  --proj-item-hover-bg: var(--primary-alpha-04);
  --proj-num-color: var(--primary-alpha-20);

  --ptag-primary-bg: var(--primary-alpha-15);
  --ptag-primary-border: var(--primary-alpha-30);
  --ptag-gold-bg: var(--gold-alpha-10);
  --ptag-gold-border: var(--gold-alpha-25);
  --ptag-accent-bg: var(--accent-alpha-10);
  --ptag-accent-border: var(--accent-alpha-25);

  --proj-stack-border: var(--text-alpha-10);

  --skill-bloc-border: var(--primary-alpha-30);
  --skill-bloc-hover-shadow: 0 6px 24px var(--primary-alpha-25);
  --skill-bloc-title-border: var(--primary-alpha-25);
  --tags-wrap-border: var(--text-alpha-08);

  --bars-border: var(--primary-alpha-25);

  --formation-border-top: var(--primary-alpha-25);
  --form-item-border: var(--primary-alpha-20);

  --contact-halo-gradient: radial-gradient(circle at 50% 50%, var(--primary-alpha-06) 0%, transparent 65%);
  --cta-link-border: var(--primary-alpha-35);
  --cta-link-primary-hover-shadow: 0 6px 20px var(--primary-alpha-45);

  --page-header-bg-gradient: linear-gradient(180deg, var(--bg) 0%, var(--card) 100%);
  --page-header-grid-image: linear-gradient(var(--primary-alpha-04) 1px, transparent 1px), linear-gradient(90deg, var(--primary-alpha-04) 1px, transparent 1px);
  --page-header-halo-gradient: radial-gradient(circle, var(--primary-alpha-10) 0%, transparent 65%);
  --page-header-border-bottom: var(--primary-alpha-25);

  --proj-card-img-border: var(--primary-alpha-30);
  --proj-card-img-shadow: 0 8px 32px var(--black-alpha-60);
  --proj-card-img-filter: brightness(.9);
  --proj-card-img-hover-filter: brightness(1);
  --proj-card-img-overlay-gradient: linear-gradient(180deg, transparent 50%, var(--primary-alpha-35) 100%);
  --proj-card-num-color: var(--text-alpha-90);
  --proj-card-num-shadow: 0 2px 8px var(--black-alpha-80);

  --cv-frame-border: var(--primary-alpha-35);
  --cv-frame-shadow: 0 12px 40px var(--black-alpha-70);
  --iframe-bg: #fff;
  --cv-frame-overlay-gradient: linear-gradient(180deg, transparent 70%, var(--black-alpha-50) 100%);
  --cv-open-btn-bg: var(--primary-alpha-80);

  --contact-card-border: var(--primary-alpha-20);
  --contact-dispo-border: var(--gold-alpha-20);
  --form-input-border: var(--primary-alpha-25);
  --placeholder-color: rgba(160,144,152,.5);

  --linkedin-color: #0a66c2;
  --linkedin-bg: rgba(10,102,194,.15);
  --linkedin-shadow: 0 0 12px rgba(10,102,194,.25);
  --linkedin-hover-color: #3b8fe8;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--alice);
  overflow-x: hidden;
  line-height: 1.6;
  position: relative;
}

/* Overlay texture */
body::before {
  content: '';
  position: fixed; inset: 0;
  background: var(--body-overlay-gradient);
  pointer-events: none; z-index: 0;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--primary), var(--accent)); border-radius: 2px; }

/* ════════════════════════════════════
   NAVIGATION
════════════════════════════════════ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0 3rem;
  height: 68px; /* Default height */
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  border-bottom: 2px solid var(--primary);
  box-shadow: var(--nav-shadow);
  transition: height .3s;
}
nav.scrolled { height: 54px; }

.nav-logo {
  font-family: var(--cinzel); font-size: 1.3rem; font-weight: 700;
  color: var(--primary); text-decoration: none; letter-spacing: .1em;
  text-shadow: 0 0 12px var(--primary);
  white-space: nowrap;
}

.nav-links {
  display: flex; gap: 0; list-style: none;
  justify-content: center;
  margin-left: auto; /* Pousse les liens et les boutons vers la droite */
}
.nav-links li a {
  font-family: var(--oswald); font-size: 1rem; font-weight: 500;
  color: var(--nav-link-color); text-decoration: none;
  letter-spacing: .16em; text-transform: uppercase;
  padding: 0 1.8rem;
  height: 68px; display: flex; align-items: center;
  transition: color .2s, background .2s;
  position: relative;
}
.nav-links li a::after {
  content: ''; position: absolute; bottom: 0; left: 1.8rem; right: 1.8rem;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0); transform-origin: center;
  transition: transform .25s ease;
}
.nav-links li a:hover {
  color: var(--text);
  background: var(--nav-link-hover-bg);
}
.nav-links li a.active {
  color: var(--gold);
  text-shadow: 0 0 10px var(--gold-alpha-35);
}
.nav-links li a:hover::after,
.nav-links li a.active::after { transform: scaleX(1); }

.nav-cta {
  font-family: var(--oswald); font-size: .85rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  padding: .65rem 1.5rem;
  background: linear-gradient(90deg, var(--primary), var(--accent)); /* Keep as gradient */
  color: var(--cta-text-color); text-decoration: none;
  border: 1px solid var(--primary);
  white-space: nowrap;
  transition: transform .2s, box-shadow .2s;
}
.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px var(--primary-alpha-50); /* Adjusted alpha */
}

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.hamburger span { width: 22px; height: 2px; background: var(--text); display: block; transition: .3s; }

/* MOBILE NAV */
.mobile-nav {
  position: fixed; inset: 0; background: var(--bg); z-index: 200;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2rem; transform: translateX(100%);
  transition: transform .4s cubic-bezier(.16,1,.3,1);
  border-left: 2px solid var(--border);
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav a {
  font-family: var(--cinzel); font-size: 1.8rem; font-weight: 700;
  color: var(--text); text-decoration: none; transition: color .2s, text-shadow .2s;
}
.mobile-nav a:hover { color: var(--primary); text-shadow: 0 0 10px var(--primary); }
.mobile-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  font-size: 1.3rem; color: var(--muted);
  background: none; border: none; cursor: pointer; font-family: var(--oswald);
}

/* ════════════════════════════════════
   HERO
════════════════════════════════════ */
#hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 9rem 3.5rem 5rem;
  position: relative; overflow: hidden;
  background: var(--hero-bg-gradient);
}

/* Halo rouge derrière le nom */
#hero::after {
  content: '';
  position: absolute; left: -50px; top: 50%; transform: translateY(-50%);
  width: 600px; height: 600px; border-radius: 50%; /* Keep size */
  background: var(--hero-halo-gradient);
  pointer-events: none;
}

/* Grille fine */
#hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: var(--hero-grid-image);
  background-size: 55px 55px;
}

.hero-kicker {
  font-family: var(--oswald); font-size: .76rem; font-weight: 400;
  color: var(--primary); letter-spacing: .2em; text-transform: uppercase;
  margin-bottom: 1.4rem;
  opacity: 0; animation: up .6s .1s forwards;
  text-shadow: 0 0 6px var(--primary);
}

h1 {
  font-family: var(--cinzel);
  font-size: clamp(3.8rem, 9vw, 8rem);
  font-weight: 700; line-height: .92; letter-spacing: -.01em;
  margin-bottom: 1.5rem; color: var(--text);
  position: relative; z-index: 1;
}
.line-wrap { display: block; overflow: hidden; }
.reveal-word {
  display: inline-block; transform: translateY(110%);
  animation: slideUp .85s cubic-bezier(.16,1,.3,1) forwards;
}
.delay-1 { animation-delay: .14s; }
/* Dutilleul en doré */
.line-wrap:last-child .reveal-word {
  color: var(--gold);
  text-shadow: 0 0 20px rgba(255,215,0,.3);
}

.hero-role {
  font-family: var(--alice); font-size: 1rem; color: var(--muted); line-height: 1.6;
  margin-bottom: .5rem; position: relative; z-index: 1;
  opacity: 0; animation: up .6s .4s forwards;
}
.hero-seek {
  font-family: var(--oswald); font-size: .82rem; font-weight: 600;
  color: var(--accent); letter-spacing: .1em; text-transform: uppercase;
  margin-bottom: 2.5rem; position: relative; z-index: 1;
  opacity: 0; animation: up .6s .5s forwards;
}

.hero-actions {
  display: flex; gap: 1rem; flex-wrap: wrap;
  position: relative; z-index: 1;
  opacity: 0; animation: up .6s .65s forwards;
}
.btn-fill {
  padding: .85rem 2rem;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  color: var(--text); font-family: var(--oswald); font-size: .82rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
  border: 1px solid var(--primary);
  transition: transform .2s, box-shadow .2s;
}
.btn-fill:hover { transform: translateY(-2px); box-shadow: 0 8px 24px var(--primary-alpha-45); }

.btn-outline {
  padding: .85rem 2rem;
  border: 1px solid var(--primary-alpha-40); color: var(--muted);
  font-family: var(--oswald); font-size: .82rem; font-weight: 400;
  letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
  transition: border-color .2s, color .2s; /* Keep transition */
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

.hero-badge {
  position: absolute; bottom: 2.5rem; left: 3.5rem;
  display: flex; align-items: center; gap: 1rem;
  font-family: var(--oswald); font-size: .65rem; font-weight: 400;
  color: var(--muted); letter-spacing: .2em; text-transform: uppercase;
  opacity: 0; animation: up .6s 1s forwards;
}
.badge-dot { color: var(--gold); }

/* ════════════════════════════════════
   SECTIONS COMMUNES
════════════════════════════════════ */
section { padding: 6rem 3.5rem; position: relative; z-index: 1; }
#about    { background: var(--card); }
#projects { background: var(--bg); }
#skills   { background: var(--card); }
#contact  { background: var(--bg); }

.section-tag {
  display: inline-block;
  font-family: var(--oswald); font-size: .7rem; font-weight: 600;
  color: var(--primary); letter-spacing: .16em; text-transform: uppercase;
  margin-bottom: .8rem;
  padding: .2rem .7rem;
  background: var(--section-tag-bg);
  border-left: 2px solid var(--primary);
  text-shadow: 0 0 6px var(--primary);
}

h2 {
  font-family: var(--cinzel);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700; line-height: 1.0; letter-spacing: .01em;
  margin-bottom: 1rem; color: var(--text);
}
h2 em { font-style: normal; color: var(--gold); text-shadow: 0 0 14px rgba(255,215,0,.25); }
/* Keep gradient for underline */
h2::after {
  content: ''; display: block; width: 60px; height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  margin-top: .6rem; border-radius: 2px;
}

.section-desc {
  font-family: var(--alice); font-size: .92rem; color: var(--muted);
  line-height: 1.7; max-width: 520px; margin-bottom: 3.5rem;
}

.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s, transform .6s; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ════════════════════════════════════
   ABOUT
════════════════════════════════════ */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4rem; margin-top: 2rem; align-items: start;
}

.about-left p {
  font-family: var(--alice); font-size: .94rem; color: var(--muted);
  line-height: 1.85; margin-bottom: 1rem;
}
.about-left strong { color: var(--text); }
strong.gold { color: var(--gold); }

.info-table {
  background: var(--input-bg); border: 1px solid var(--info-table-border);
  border-radius: 10px; overflow: hidden; margin-bottom: 1.5rem;
  box-shadow: 0 4px 16px var(--shadow);
}
.info-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: .7rem 1rem; border-bottom: 1px solid var(--info-row-border);
}
.info-row:last-child { border-bottom: none; }
.info-k {
  font-family: var(--oswald); font-size: .68rem; font-weight: 400;
  color: var(--muted); letter-spacing: .08em; text-transform: uppercase;
}
.info-v { font-family: var(--alice); font-size: .86rem; color: var(--text); }
.info-v.gold { color: var(--gold); font-weight: 700; }
.info-v.small { font-size: .74rem; }

.langs { margin-bottom: 1.5rem; display: flex; flex-direction: column; gap: .85rem; }
.lang-row {
  display: grid; grid-template-columns: 72px 1fr 36px;
  align-items: center; gap: .8rem;
  font-family: var(--alice); font-size: .82rem; color: var(--text);
}
.lang-track { height: 3px; background: var(--track-bg); border-radius: 2px; overflow: hidden; }
.lang-bar {
  height: 100%; width: 0; border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  transition: width 1s cubic-bezier(.16,1,.3,1);
}
.lang-lvl { font-family: var(--oswald); font-size: .66rem; font-weight: 600; color: var(--gold); text-align: right; }

.soft-skills { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.soft-skills span {
  font-family: var(--oswald); font-size: .7rem; font-weight: 400;
  padding: .35rem .85rem;
  background: var(--input-bg); border: 1px solid var(--soft-skills-border);
  color: var(--muted); letter-spacing: .04em; border-radius: 6px;
  transition: border-color .2s, color .2s, box-shadow .2s;
}
.soft-skills span:hover { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 8px var(--gold-alpha-20); }

.interests { display: flex; flex-wrap: wrap; gap: .5rem; }
.interests span {
  font-family: var(--oswald); font-size: .7rem; font-weight: 400;
  padding: .35rem .85rem;
  background: var(--input-bg); border: 1px solid var(--interests-border);
  color: var(--muted); border-radius: 6px;
  transition: border-color .2s, color .2s;
}
.interests span:hover { border-color: var(--accent); color: var(--accent); }

/* ════════════════════════════════════
   PROJECTS
════════════════════════════════════ */
.projects-list { display: flex; flex-direction: column; margin-top: 2rem; }

.proj-item {
  display: grid; grid-template-columns: 64px 1fr;
  gap: 2rem; padding: 2.5rem 0;
  border-top: 1px solid var(--proj-item-border);
  transition: background .2s;
}
.proj-item:last-child { border-bottom: 1px solid var(--proj-item-border); }
.proj-item:hover { background: var(--proj-item-hover-bg); }

.proj-num {
  font-family: var(--cinzel); font-size: 2.2rem; font-weight: 700; /* Keep font styles */
  color: var(--proj-num-color); line-height: 1; padding-top: .3rem;
  transition: color .2s, text-shadow .2s;
}
.proj-item:hover .proj-num { color: var(--primary); text-shadow: 0 0 10px var(--primary); }

.proj-tags { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .8rem; }
.ptag {
  font-family: var(--oswald); font-size: .62rem; font-weight: 600;
  padding: .2rem .6rem; letter-spacing: .06em; text-transform: uppercase; border-radius: 4px;
}
.ptag:nth-child(1) { background: var(--ptag-primary-bg); color: var(--primary); border: 1px solid var(--ptag-primary-border); }
.ptag:nth-child(2) { background: var(--ptag-gold-bg);  color: var(--gold);    border: 1px solid var(--ptag-gold-border); }
.ptag:nth-child(3) { background: var(--ptag-accent-bg);  color: var(--accent);  border: 1px solid var(--ptag-accent-border); }

.proj-body h3 {
  font-family: var(--cinzel); font-size: 1.3rem; font-weight: 700;
  color: var(--text); margin-bottom: .7rem;
}
.proj-body p {
  font-family: var(--alice); font-size: .88rem; color: var(--muted);
  line-height: 1.8; margin-bottom: 1.1rem; max-width: 620px;
}

.proj-stack { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .9rem; }
.proj-stack span {
  font-family: var(--oswald); font-size: .65rem; font-weight: 400;
  padding: .22rem .6rem;
  background: var(--input-bg); border: 1px solid var(--proj-stack-border);
  color: var(--muted); border-radius: 4px;
  transition: border-color .2s, color .2s;
}
.proj-stack span:hover { border-color: var(--gold); color: var(--gold); }

.proj-link { /* Keep font styles */
  font-family: var(--oswald); font-size: .78rem; font-weight: 600;
  color: var(--gold); text-decoration: none; letter-spacing: .04em;
  text-shadow: 0 0 8px rgba(255,215,0,.3);
  transition: opacity .2s;
}
.proj-link:hover { opacity: .7; }

/* ════════════════════════════════════
   SKILLS
════════════════════════════════════ */
.skills-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem; margin: 2rem 0 2.5rem;
}

.skill-bloc {
  background: var(--input-bg);
  border: 1px solid var(--skill-bloc-border);
  border-radius: 10px; padding: 1.6rem;
  box-shadow: 0 4px 16px var(--shadow);
  transition: border-color .2s, box-shadow .2s;
}
.skill-bloc:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 24px var(--skill-bloc-hover-shadow);
}

.skill-bloc-title {
  font-family: var(--oswald); font-size: .72rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--primary); text-shadow: 0 0 6px var(--primary);
  margin-bottom: 1rem; padding-bottom: .6rem;
  border-bottom: 1px solid var(--skill-bloc-title-border);
}

.tags-wrap { display: flex; flex-wrap: wrap; gap: .4rem; }
.tags-wrap span {
  font-family: var(--oswald); font-size: .68rem; font-weight: 400;
  padding: .28rem .65px; padding: .28rem .65rem;
  background: var(--card); border: 1px solid var(--tags-wrap-border);
  color: var(--muted); border-radius: 4px; transition: all .2s;
}
.tags-wrap span:hover { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 6px var(--gold-alpha-15); }

/* Barres */
.bars {
  display: flex; flex-direction: column; gap: 1.1rem;
  background: var(--input-bg); border: 1px solid var(--bars-border);
  padding: 2rem; border-radius: 10px; margin-bottom: 3rem;
  box-shadow: 0 4px 16px var(--shadow);
}
.bar-meta {
  display: flex; justify-content: space-between;
  font-family: var(--oswald); font-size: .78rem; font-weight: 400;
  color: var(--text); margin-bottom: .45rem;
}
.bar-pct { color: var(--gold); font-weight: 600; }
.bar-track { height: 3px; background: var(--track-bg); border-radius: 2px; overflow: hidden; }
.bar-fill {
  height: 100%; width: 0; border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  transition: width 1.1s cubic-bezier(.16,1,.3,1);
}

/* Formation */
.formation { border-top: 1px solid var(--formation-border-top); padding-top: 3rem; }
.form-list { display: flex; flex-direction: column; gap: 2rem; }
.form-item { display: grid; grid-template-columns: 130px 1fr; gap: 2rem; align-items: start; }
.form-year {
  font-family: var(--oswald); font-size: .75rem; font-weight: 600;
  color: var(--gold); padding-top: .2rem; text-shadow: 0 0 6px var(--gold-alpha-20);
}
.form-title {
  font-family: var(--cinzel); font-size: 1.05rem; font-weight: 700;
  color: var(--text); margin-bottom: .3rem;
}
.form-sub { font-family: var(--alice); font-size: .82rem; color: var(--muted); line-height: 1.6; }

/* ════════════════════════════════════
   CONTACT
════════════════════════════════════ */
#contact { text-align: center; }

#contact::before {
  content: ''; /* Keep content */
  position: absolute; inset: 0;
  background: var(--contact-halo-gradient);
  pointer-events: none;
}

.contact-title {
  font-family: var(--cinzel);
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  font-weight: 700; line-height: .95; margin-bottom: 1.5rem; color: var(--text);
}
.contact-title em { font-style: normal; color: var(--gold); text-shadow: 0 0 20px var(--gold-alpha-25); }
.contact-desc { font-family: var(--alice); font-size: .95rem; color: var(--muted); line-height: 1.8; margin-bottom: 2.5rem; }

.contact-links { display: flex; justify-content: center; flex-wrap: wrap; gap: .8rem; }
.cta-link {
  font-family: var(--oswald); font-size: .78rem; font-weight: 400;
  padding: .85rem 1.7rem;
  background: var(--input-bg); border: 1px solid rgba(179,0,27,.35);
  color: var(--muted); text-decoration: none; letter-spacing: .05em; border-radius: 8px; /* Keep styles */
  transition: border-color .2s, color .2s, box-shadow .2s;
}
.cta-link:hover { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 12px var(--gold-alpha-20); }
.cta-link.primary {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  color: var(--text); border-color: var(--primary); font-weight: 600; /* Keep styles */
}
.cta-link.primary:hover { box-shadow: 0 6px 20px var(--cta-link-primary-hover-shadow); color: var(--text); border-color: var(--gold); }

/* ════════════════════════════════════
   FOOTER
════════════════════════════════════ */
footer {
  padding: 1.8rem 3.5rem;
  background: var(--card);
  border-top: 2px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--oswald); font-size: .7rem; font-weight: 300;
  color: var(--muted); letter-spacing: .06em;
  box-shadow: 0 -4px 14px var(--shadow);
}
footer strong { color: var(--text); font-weight: 600; } /* Keep styles */
.footer-motto { color: var(--gold); letter-spacing: .18em; text-shadow: 0 0 6px rgba(255,215,0,.2); }

/* ════════════════════════════════════
   ANIMATIONS
════════════════════════════════════ */
@keyframes slideUp { to { transform: translateY(0); } }
@keyframes up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* ════════════════════════════════════
   RESPONSIVE
════════════════════════════════════ */
@media (max-width: 1000px) {
  .skills-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  nav { padding: 0 1.5rem; height: 56px; }
  nav.scrolled { height: 48px; }
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
  .theme-toggle { margin-left: auto; } /* Adjust position for mobile */
  #hero { padding: 7rem 1.5rem 5rem; }
  section { padding: 4.5rem 1.5rem; }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .proj-item { grid-template-columns: 1fr; gap: .4rem; }
  .proj-num  { font-size: 1.3rem; }
  .skills-grid { grid-template-columns: 1fr; }
  .form-item { grid-template-columns: 1fr; gap: .4rem; }
  footer { flex-direction: column; gap: .8rem; text-align: center; padding: 1.4rem; }
}
@media (max-width: 480px) {
  h1 { font-size: 3rem; }
  .hero-badge { display: none; }
  .contact-title { font-size: 2.2rem; }
}

/* ════════════════════════════════════
   PAGES INTERNES (projets / contact)
════════════════════════════════════ */

/* ── Page header ── */
.page-header {
  padding: 9rem 3.5rem 4rem;
  background: linear-gradient(180deg, #120f13 0%, #1a151a 100%);
  position: relative; overflow: hidden; /* Keep styles */
  border-bottom: 1px solid var(--page-header-border-bottom);
}
.page-header::before {
  content: '';
  position: absolute; inset: 0;
  background-image: var(--page-header-grid-image);
  background-size: 55px 55px;
}
.page-header::after {
  position: absolute; right: -80px; top: 50%; transform: translateY(-50%);
  width: 500px; height: 500px; border-radius: 50%;
  background: var(--page-header-halo-gradient);
  pointer-events: none;
}
.page-title {
  font-family: var(--cinzel);
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 700; line-height: .92; letter-spacing: -.01em;
  margin-bottom: 1.2rem; color: var(--text);
  position: relative; z-index: 1;
}
.page-title .line-wrap:last-child .reveal-word { /* Keep styles */
  color: var(--gold);
  text-shadow: 0 0 20px rgba(255,215,0,.25);
}
.page-desc {
  font-family: var(--alice); font-size: 1rem; color: var(--muted);
  line-height: 1.6; position: relative; z-index: 1;
  opacity: 0; animation: up .6s .5s forwards;
}

/* ── Formation (section séparée) ── */
#formation { background: var(--bg); }
.form-list { display: flex; flex-direction: column; gap: 2rem; margin-top: 1.5rem; }
.form-item {
  display: grid; grid-template-columns: 140px 1fr;
  gap: 2rem; align-items: start; /* Keep styles */
  padding: 1.5rem; background: var(--input-bg);
  border: 1px solid var(--form-item-border); border-radius: 8px;
  transition: border-color .2s;
}
.form-item:hover { border-color: var(--primary); }
.form-year {
  font-family: var(--oswald); font-size: .78rem; font-weight: 600; /* Keep styles */
  color: var(--gold); padding-top: .2rem;
  text-shadow: 0 0 6px rgba(255,215,0,.2);
}
.form-title {
  font-family: var(--cinzel); font-size: 1rem; font-weight: 700;
  color: var(--text); margin-bottom: .3rem;
}
.form-sub { font-family: var(--alice); font-size: .82rem; color: var(--muted); line-height: 1.6; }

/* ── Détails projets ── */
.proj-details { margin: 1rem 0 1.2rem; display: flex; flex-direction: column; gap: .55rem; }
.proj-detail-item {
  display: flex; gap: .7rem; align-items: flex-start;
  font-family: var(--alice); font-size: .85rem; color: var(--muted); line-height: 1.7;
}
.detail-bullet { color: var(--primary); flex-shrink: 0; margin-top: .1rem; font-size: .7rem; }
.proj-detail-item strong { color: var(--text); }

/* ── CTA projets ── */
.projects-cta {
  padding: 5rem 3.5rem; background: var(--card);
  text-align: center;
  border-top: 1px solid var(--proj-item-border);
}
.cta-text {
  font-family: var(--cinzel); font-size: 1.8rem; font-weight: 700;
  color: var(--text); margin-bottom: 2rem;
}
.projects-cta .btn-fill { display: inline-block; }

/* ── Footer nav ── */
.footer-nav {
  display: flex; gap: 1.5rem;
}
.footer-nav a {
  font-family: var(--oswald); font-size: .7rem; font-weight: 300;
  color: var(--muted); text-decoration: none; letter-spacing: .08em;
  text-transform: uppercase; transition: color .2s;
}
.footer-nav a:hover { color: var(--gold); }

/* ════════════════════════════════════
   CONTACT PAGE
════════════════════════════════════ */
#contact-main { background: var(--bg); }

.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 5rem; align-items: start;
}

/* Cards coordonnées */
.contact-cards { display: flex; flex-direction: column; gap: .8rem; margin: 1.5rem 0 2rem; }

.contact-card {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.2rem;
  background: var(--input-bg); border: 1px solid var(--contact-card-border);
  border-radius: 8px; text-decoration: none;
  transition: border-color .2s, box-shadow .2s;
}
.contact-card:hover {
  border-color: var(--gold);
  box-shadow: 0 0 12px var(--gold-alpha-15);
}
.contact-card.no-link { cursor: default; }
.contact-card.no-link:hover { border-color: rgba(179,0,27,.2); box-shadow: none; }

.cc-icon { font-size: 1.2rem; flex-shrink: 0; width: 28px; text-align: center; }
.cc-label {
  font-family: var(--oswald); font-size: .65rem; font-weight: 300;
  color: var(--muted); letter-spacing: .1em; text-transform: uppercase; margin-bottom: .2rem;
}
.cc-val { font-family: var(--alice); font-size: .88rem; color: var(--text); }

/* Dispo badge */
.contact-dispo {
  display: flex; align-items: center; gap: .7rem;
  font-family: var(--alice); font-size: .88rem; color: var(--muted);
  padding: .8rem 1rem; background: var(--input-bg); /* Keep styles */
  border: 1px solid rgba(255,215,0,.2); border-radius: 8px;
}
.contact-dispo strong { color: var(--gold); }
.dispo-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold); flex-shrink: 0;
  box-shadow: 0 0 8px rgba(255,215,0,.6);
  animation: blink 2s infinite; /* Keep animation */
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

/* Formulaire */
.contact-form { display: flex; flex-direction: column; gap: 0; margin-top: 1.5rem; }
.form-group { display: flex; flex-direction: column; margin-bottom: 1.1rem; }
.form-group label {
  font-family: var(--oswald); font-size: .7rem; font-weight: 400;
  color: var(--muted); letter-spacing: .1em; text-transform: uppercase;
  margin-bottom: .45rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--input-bg); /* Keep styles */
  border: 1px solid var(--form-input-border); border-radius: 8px;
  padding: .85rem 1rem;
  color: var(--text); font-family: var(--alice); font-size: .9rem;
  outline: none; transition: border-color .2s, box-shadow .2s;
  width: 100%;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--placeholder-color); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { /* Keep styles */
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(179,0,27,.2);
}
.form-group select option { background: var(--card); }
.form-group textarea { resize: vertical; min-height: 140px; }

.form-submit { width: 100%; justify-content: center; margin-top: .5rem; }
.form-note {
  font-family: var(--alice); font-size: .75rem; color: var(--muted);
  text-align: center; margin-top: .8rem; font-style: italic; opacity: .7;
}

/* ════════════════════════════════════
   RESPONSIVE — pages internes
════════════════════════════════════ */
@media (max-width: 820px) {
  .page-header { padding: 7rem 1.5rem 3rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
  .footer-nav { display: none; }
  .form-item { grid-template-columns: 1fr; gap: .5rem; }
  .projects-cta { padding: 3.5rem 1.5rem; }
  .cta-text { font-size: 1.3rem; }
}

/* ════════════════════════════════════
   PROJ-CARD (image + descriptif)
════════════════════════════════════ */
.proj-card {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 3rem;
  padding: 3rem 0;
  border-top: 1px solid var(--proj-item-border);
  align-items: start;
}
.proj-card:last-child { border-bottom: 1px solid var(--proj-item-border); }

/* Image */
.proj-card-img {
  position: relative;
  border: 1px solid var(--proj-card-img-border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
  flex-shrink: 0;
}
.proj-card-img img {
  width: 100%;
  display: block;
  transition: transform .4s ease; /* Keep transition */
  filter: var(--proj-card-img-filter);
}
.proj-card:hover .proj-card-img img {
  transform: scale(1.03);
  filter: var(--proj-card-img-hover-filter);
}
/* Overlay rouge au hover */
.proj-card-img::after {
  content: ''; position: absolute; inset: 0; /* Keep styles */
  background: var(--proj-card-img-overlay-gradient);
  pointer-events: none;
}

/* Numéro sur l'image */
.proj-card-num {
  position: absolute; top: 12px; left: 14px;
  font-family: var(--cinzel); font-size: 1.5rem; font-weight: 700;
  color: var(--proj-card-num-color);
  text-shadow: 0 2px 8px rgba(0,0,0,.8);
  line-height: 1;
}

/* Corps du projet */
.proj-card-body { padding-top: .4rem; }
.proj-card-body h3 {
  font-family: var(--cinzel); font-size: 1.35rem; font-weight: 700;
  color: var(--text); margin-bottom: .7rem;
}
.proj-card-body p {
  font-family: var(--alice); font-size: .9rem; color: var(--muted);
  line-height: 1.8; margin-bottom: 1rem;
}

/* Sections académiques et personnelles */
#academiques { background: var(--card); }
#personnels  { background: var(--bg); }
#academiques .section-tag,
#personnels  .section-tag { margin-bottom: 1.5rem; }

/* Responsive proj-card */
@media (max-width: 1100px) {
  .proj-card { grid-template-columns: 340px 1fr; gap: 2rem; }
}
@media (max-width: 820px) {
  .proj-card {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .proj-card-img { max-height: 220px; overflow: hidden; }
  .proj-card-img img { object-fit: cover; height: 220px; width: 100%; }
}

/* ════════════════════════════════════
   SECTION CV
════════════════════════════════════ */
#cv-section { /* Keep styles */
  background: var(--card);
  border-top: 1px solid rgba(179,0,27,.25);
}

.cv-inner {
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 4rem;
  align-items: center;
}

/* Texte gauche */
.cv-text p {
  font-family: var(--alice); font-size: .93rem;
  color: var(--muted); line-height: 1.8;
  margin-bottom: 1.8rem;
}

.cv-meta {
  display: flex; gap: 1.5rem; flex-wrap: wrap;
  margin-bottom: 2rem;
}
.cv-meta-item {
  display: flex; flex-direction: column; gap: .25rem;
}
.cv-meta-label {
  font-family: var(--oswald); font-size: .65rem; font-weight: 300;
  color: var(--muted); letter-spacing: .1em; text-transform: uppercase;
}
.cv-meta-val {
  font-family: var(--alice); font-size: .9rem; color: var(--text);
}

.cv-actions {
  display: flex; gap: 1rem; flex-wrap: wrap;
}

/* Preview iframe */
.cv-preview { position: relative; }

.cv-frame {
  position: relative;
  border: 1px solid var(--cv-frame-border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.7);
  height: 620px;
}
.cv-frame iframe {
  width: 100%; height: 100%;
  border: none; display: block; /* Keep styles */
  background: var(--iframe-bg);
}

/* Overlay subtil sur la preview */
.cv-frame-overlay {
  position: absolute; inset: 0; /* Keep styles */
  background: linear-gradient(180deg, transparent 70%, rgba(0,0,0,.5) 100%);
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 1.2rem;
  opacity: 0; transition: opacity .3s;
  pointer-events: none;
}
.cv-frame:hover .cv-frame-overlay {
  opacity: 1;
  pointer-events: auto;
}
.cv-open-btn {
  font-family: var(--oswald); font-size: .78rem; font-weight: 600;
  color: #fff; text-decoration: none; letter-spacing: .08em;
  padding: .5rem 1.2rem;
  background: var(--cv-open-btn-bg); border: 1px solid var(--primary);
  border-radius: 4px; transition: background .2s;
}
.cv-open-btn:hover { background: var(--primary); }

/* Responsive */
@media (max-width: 1100px) {
  .cv-inner { grid-template-columns: 1fr 380px; gap: 2.5rem; }
  .cv-frame  { height: 500px; }
}
@media (max-width: 820px) {
  .cv-inner { grid-template-columns: 1fr; gap: 2rem; }
  .cv-frame  { height: 420px; }
}

/* LinkedIn card */
.contact-card--linkedin .cc-icon {
  font-family: var(--oswald); font-size: 1rem; font-weight: 700;
  color: #0a66c2; background: rgba(10,102,194,.15);
  width: 32px; height: 32px; border-radius: 4px; /* Keep styles */
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-card--linkedin:hover {
  border-color: #0a66c2;
  box-shadow: 0 0 12px var(--linkedin-shadow);
}
.contact-card--linkedin:hover .cc-val { color: #3b8fe8; }

/* ════════════════════════════════════
   MODAL MENTIONS LÉGALES
════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s ease;
  padding: 1.5rem;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }

.modal-content {
  background: var(--card);
  border: 1px solid var(--primary);
  width: 100%; max-width: 800px;
  max-height: 85vh; overflow-y: auto;
  position: relative; padding: 3rem 2rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.8);
  transform: translateY(20px);
  transition: transform 0.4s ease;
}
.modal-overlay.open .modal-content { transform: translateY(0); }

.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: none; color: var(--muted);
  font-size: 1.5rem; cursor: pointer; transition: color 0.2s;
}
.modal-close:hover { color: var(--primary); }

.modal-content h2 { margin-top: 2rem; font-size: 1.5rem; }
.modal-content h2:first-of-type { margin-top: 0; }
.modal-content p { 
    font-family: var(--alice); color: var(--muted); 
    margin-bottom: 1rem; line-height: 1.7; 
}
.modal-content strong { color: var(--gold); }

.modal-content::-webkit-scrollbar { width: 3px; }
.modal-content::-webkit-scrollbar-thumb { background: var(--primary); }
