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

/* ── THÈME SOMBRE (défaut) ── */
:root {
  --bg:        #0f0f0f;
  --bg-card:   #161616;
  --bg-glass:  rgba(255,255,255,0.03);
  --border:    rgba(255,255,255,0.08);
  --text:      #f0ede8;
  --text-muted:#8a8580;
  --nav-bg:    rgba(15,15,15,0.88);

  --green:        #3db85a;
  --green-dim:    rgba(61,184,90,0.10);
  --green-border: rgba(61,184,90,0.22);

  --gold:      #c9a84c;
  --gold-hi:   #e2c77a;
  --gold-dim:  rgba(201,168,76,0.10);
  --gold-border: rgba(201,168,76,0.28);
}

/* ── THÈME CLAIR ── */
[data-theme="light"] {
  --bg:        #f5f3ef;
  --bg-card:   #ffffff;
  --bg-glass:  rgba(0,0,0,0.02);
  --border:    rgba(0,0,0,0.09);
  --text:      #1a1a18;
  --text-muted:#7a7672;
  --nav-bg:    rgba(245,243,239,0.90);

  --green:        #1e8c3a;
  --green-dim:    rgba(30,140,58,0.08);
  --green-border: rgba(30,140,58,0.20);

  --gold:      #a67c20;
  --gold-hi:   #c49a2e;
  --gold-dim:  rgba(166,124,32,0.08);
  --gold-border: rgba(166,124,32,0.22);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  transition: background-color 0.3s, color 0.3s;
}

/* ── TRANSITIONS THÈME ── */
nav, .skill-card, .project-card, .about-avatar,
.contact-link-icon, .form-group input, .form-group textarea,
#skills, #experience, footer { transition: background 0.3s, border-color 0.3s, color 0.3s; }

/* Hero glow adapté au thème clair */
[data-theme="light"] .hero::before {
  background: radial-gradient(circle, rgba(30,140,58,0.08) 0%, transparent 70%);
}
[data-theme="light"] .hero::after {
  background: radial-gradient(circle, rgba(166,124,32,0.07) 0%, transparent 70%);
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 4rem;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--border);
  transition: background 0.3s, border-color 0.3s;
}

/* ── THEME TOGGLE ── */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-glass);
  border: 0.5px solid var(--border);
  border-radius: 100px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.theme-toggle:hover { border-color: var(--gold); color: var(--gold); }
.theme-toggle .toggle-track {
  width: 32px; height: 18px;
  background: var(--border);
  border-radius: 100px;
  position: relative;
  transition: background 0.25s;
  flex-shrink: 0;
  border: 0.5px solid var(--border);
}
[data-theme="light"] .theme-toggle .toggle-track { background: var(--gold-dim); border-color: var(--gold-border); }
.theme-toggle .toggle-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform 0.25s, background 0.25s;
}
[data-theme="light"] .theme-toggle .toggle-thumb { transform: translateX(14px); background: var(--gold); }
.toggle-icon { font-size: 14px; line-height: 1; }
.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--gold);
  letter-spacing: 0.04em;
  text-decoration: none;
}
.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a {
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 4rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(61,184,90,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -100px; left: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(201,168,76,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner { max-width: 1000px; }
.hero-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-dim);
  border: 0.5px solid var(--green-border);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  margin-bottom: 2rem;
}
.hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(3rem, 10vw, 3.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 1.5rem;
}
.hero h1 span { color: var(--gold); }
.hero p {
  font-size: 1.15rem;
  font-weight: 300;
  color: var(--text-muted);
  max-width: 540px;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}
.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ── BOUTONS ── */
.btn-primary {
  display: inline-block;
  padding: 0.85rem 2rem;
  background: var(--text);
  color: #000000;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover { background: var(--gold-hi); color: #0f0f0f; transform: translateY(-2px); }
.btn-outline {
  display: inline-block;
  padding: 0.85rem 2rem;
  background: transparent;
  color: var(--text-muted);
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  border: 0.5px solid var(--border);
  border-radius: 6px;
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
}
.btn-outline:hover { border-color: rgba(255,255,255,0.3); color: var(--text); transform: translateY(-2px); }

/* ── SECTION BASE ── */
section { padding: 7rem 4rem; }
.section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.8rem;
}
.section-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 1rem;
}
.section-sub {
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-muted);
  max-width: 500px;
  margin-bottom: 3.5rem;
}
.divider {
  width: 100%;
  height: 0.5px;
  background: var(--border);
}

/* ── ABOUT ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  max-width: 1100px;
}
.about-avatar {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  color: var(--text-muted);
  position: relative;
  overflow: hidden;
}
.about-avatar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(201,168,76,0.05) 0%, transparent 60%);
}
.about-avatar-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  z-index: 1;
}
.about-avatar-placeholder svg { opacity: 0.4; }
.about-text p { color: var(--text-muted); font-weight: 300; margin-bottom: 1.2rem; font-size: 1rem; line-height: 1.8; }
.about-text p strong { color: var(--text); font-weight: 500; }
.stats-row { display: flex; gap: 2.5rem; margin-top: 2.5rem; }
.stat-num {
  font-family: 'Syne', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}
.stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.2rem; }

/* ── SKILLS ── */
#skills { background: var(--bg-card); }
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
}
.skill-card {
  background: var(--bg-glass);
  border: 0.5px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}
.skill-card:hover { border-color: rgba(255,255,255,0.2); transform: translateY(-4px); }
.skill-icon {
  width: 40px; height: 40px;
  background: var(--gold-dim);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 20px;
}
.skill-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.skill-card p { font-size: 0.875rem; color: var(--text-muted); font-weight: 300; line-height: 1.6; }

/* ── PROJETS ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  max-width: 1100px;
}
.project-card {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}
.project-card:hover { border-color: rgba(255,255,255,0.2); transform: translateY(-5px); }
.project-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 0.5px solid var(--border);
}
.project-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.project-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.tag {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-dim);
  border: 0.5px solid var(--green-border);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}
.project-body h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.project-body p { font-size: 0.9rem; color: var(--text-muted); font-weight: 300; flex: 1; }
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gold);
  text-decoration: none;
  margin-top: 1.2rem;
  transition: color 0.2s;
}
.project-link:hover { color: var(--gold-hi); }

/* ── EXPÉRIENCE ── */
#experience { background: var(--bg-card); }
.timeline { max-width: 720px; }
.timeline-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  position: relative;
}
.timeline-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 140px;
  top: 8px;
  bottom: 0;
  width: 0.5px;
  background: var(--border);
  transform: translateX(calc(-2.5rem + -0.25px));
}
.tl-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
  padding-top: 0.15rem;
  text-align: right;
}
.tl-dot {
  position: absolute;
  left: calc(140px - 2.5rem + -4.5px);
  top: 8px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--bg-card);
}
.tl-role {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.2rem;
}
.tl-company {
  font-size: 0.875rem;
  color: var(--green);
  font-weight: 400;
  margin-bottom: 0.6rem;
}
.tl-desc { font-size: 0.9rem; color: var(--text-muted); font-weight: 300; line-height: 1.7; }

/* ── CONTACT ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
  max-width: 1000px;
}
.contact-intro h2 {
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
}
.contact-intro p { color: var(--text-muted); font-weight: 300; font-size: 1rem; line-height: 1.8; }
.contact-links { display: flex; flex-direction: column; gap: 1rem; margin-top: 2rem; }
.contact-link-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.contact-link-item:hover { color: var(--text); }
.contact-link-icon {
  width: 36px; height: 36px;
  background: var(--bg-glass);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.form-group { margin-bottom: 1.2rem; }
.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
  resize: none;
}
.form-group input:focus,
.form-group textarea:focus { border-color: rgba(255,255,255,0.25); }
.form-group textarea { height: 130px; }
.btn-send {
  width: 100%;
  border: none;
  cursor: pointer;
  background: var(--gold);
  color: #0f0f0f;
  padding: 0.85rem 2rem;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  border-radius: 6px;
  transition: background 0.2s, transform 0.15s;
}
.btn-send:hover { background: var(--gold-hi); transform: translateY(-2px); }

/* ── FOOTER ── */
footer {
  border-top: 0.5px solid var(--border);
  padding: 2rem 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
footer p { font-size: 0.8rem; color: var(--text-muted); }
.footer-logo { font-family: 'Syne', sans-serif; font-weight: 800; color: var(--gold); font-size: 1rem; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links { display: none; }
  section { padding: 5rem 1.5rem; }
  .hero { padding: 0 1.5rem; }
  .hero h1 { font-size: 2.8rem; }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .timeline-item { grid-template-columns: 1fr; gap: 0.3rem; }
  .tl-date { text-align: left; }
  .tl-dot { display: none; }
  .timeline-item::after { display: none; }
  footer { flex-direction: column; gap: 0.5rem; text-align: center; }
}