:root{
  --bg: #09090b;
  --surface: #121214;
  --surface-2: #1e1e24;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #e4e4e7;
  --accent-2: #3b82f6;
  --shadow: 0 8px 30px rgba(0,0,0,0.5);
}

html[data-theme="light"] {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --text: #09090b;
  --muted: #71717a;
  --line: rgba(0, 0, 0, 0.1);
  --accent: #18181b;
  --accent-2: #2563eb;
  --shadow: 0 8px 30px rgba(0,0,0,0.08);
}
html[data-theme="light"] body {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
}

*{box-sizing:border-box}
html,body {
  margin: 0;
  padding: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center top;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Outfit", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

.container{
  max-width:1180px;
  margin:0 auto;
  padding:0 24px;
}

/* =========================================
   HEADER & NAVIGATION
========================================= */
.siteHeader{
  position:sticky;
  top:0;
  z-index:10;
  backdrop-filter: blur(12px);
  background:rgba(9, 9, 11, 0.85);
  border-bottom:1px solid var(--line);
}

.headerInner{
  display:flex;
  align-items:center;
  justify-content:center; /* Centrer le header */
  padding:18px 0;
  gap:40px; /* Plus d'espace entre le logo et la nav */
  flex-wrap: wrap;
}

.logo{
  display:flex;
  align-items:center;
  gap:14px;
  font-weight:700;
  transition: transform .3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.logoMark{
  width:44px;
  height:44px;
  border-radius: 0;
  display:grid;
  place-items:center;
  background:var(--accent-2);
  box-shadow: none;
}

.logoMarkImg{
  width:44px;
  height:44px;
  border-radius: 0;
  object-fit: cover;
}

.logoText{
  display:flex;
  flex-direction:column;
}

.logoName{font-size:16px}
.logoRole{font-size:12px; color:var(--muted)}

.nav{
  display:flex;
  gap:18px;
  flex-wrap:wrap;
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 12px;
  border-radius: 0;
  border: 1px solid var(--line);
}

.nav a{
  padding:8px 16px;
  border-radius: 0;
  border:1px solid transparent;
  color:var(--muted);
  transition:all .3s ease;
  font-weight: 500;
}

.nav a:hover, .nav a.active{
  color:var(--text);
  border-color: var(--line);
  background:rgba(255, 255, 255, 0.05);
}

/* =========================================
   UTILITIES
========================================= */
.pt-0 { padding-top: 0 !important; }

/* =========================================
   HERO SECTION
========================================= */
.hero{
  padding:72px 0 56px;
}

.heroGrid{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap:28px;
  align-items:start;
}

.centered-hero {
  text-align: center;
  padding: 18vh 0 10vh;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.centered-hero h1 {
  font-size: 56px;
  line-height: 1.15;
  margin: 24px auto 48px;
  max-width: 1000px;
}

.profile-section {
  text-align: center;
  padding: 10vh 0 18vh;
}

.profile-section .lead {
  max-width: 700px;
  margin: 0 auto 36px;
  font-size: 22px;
  color: var(--text);
}

.center-stack {
  justify-content: center;
  margin-bottom: 36px;
  flex-wrap: wrap;
  gap: 12px;
}

.center-cta {
  justify-content: center;
  margin-bottom: 24px;
}

.center-links {
  justify-content: center;
  margin-top: 24px;
}

.heroCopy h1{
  font-size:46px;
  line-height:1.1;
  margin:10px 0 16px;
}

.eyebrow{
  text-transform:uppercase;
  letter-spacing:.2em;
  font-size:12px;
  color:var(--muted);
}

.lead{
  color:var(--muted);
  font-size:18px;
  line-height:1.6;
  margin:0 0 24px;
}

.ctaRow{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

/* =========================================
   BUTTONS
========================================= */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:12px 18px;
  border-radius: 0;
  border:1px solid transparent;
  font-weight:600;
  transition:transform .3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow .3s ease, border-color .3s ease, background .3s ease;
  cursor: pointer;
}

.btn.primary{
  background:var(--accent-2);
  color:#05070f;
  box-shadow: none;
}

.btn.ghost{
  border-color:var(--line);
  color:var(--text);
  background:rgba(255,255,255,.02);
}

.btn.small{
  padding:8px 12px;
  font-size:13px;
  border-radius: 0;
}

.btn:hover{
  transform:translateY(-3px) scale(1.02);
}

.btn.primary:hover{
  box-shadow: none;
}

.btn.ghost:hover{
  background:rgba(255,255,255,.08);
  border-color: var(--line);
}

.meta{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(160px, 1fr));
  gap:14px;
  margin-top:28px;
}

.metaLabel{
  display:block;
  color:var(--muted);
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.12em;
}

.metaValue{
  font-weight:600;
  margin-top:6px;
  display:block;
}

.heroCard{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius: 0;
  padding:28px;
  box-shadow: none;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.heroCard:hover {
  transform: translateY(-5px);
  box-shadow: none;
  border-color: var(--line);
}

.heroCard h2{
  margin:0 0 12px;
}

.heroCard p{
  margin:0 0 18px;
  color:var(--muted);
  line-height:1.6;
}

.stack{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:18px;
}

.pill{
  padding:8px 14px;
  border-radius: 0;
  background:rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  font-size:13px;
  transition: background 0.3s ease, transform 0.2s ease;
}

.pill:hover {
  background:rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.heroLinks{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}

.heroLinks a{
  color:var(--accent-2);
  font-weight:600;
  transition: color 0.2s ease;
}

.heroLinks a:hover{
  color: #fff;
}

/* =========================================
   SECTIONS GENERAL
========================================= */
.section{
  padding:64px 0;
}

.section.alt{
  background:rgba(255,255,255,.02);
}

.pageHeader {
  text-align: center;
  padding: 80px 0 40px;
}

.pageHeader h1 {
  font-size: 42px;
  margin-bottom: 16px;
}

.pageHeader .lead {
  max-width: 600px;
  margin: 0 auto;
}

.sectionTitle{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-bottom:36px;
}

.sectionTitle h2{
  margin:0;
  font-size:32px;
}

.sectionTitle p{
  margin:0;
  color:var(--muted);
}

/* =========================================
   SKILLS & EXPERIENCES (À Propos)
========================================= */
.skills-carousel-container {
  overflow: hidden;
  width: 100%;
  padding: 20px 0;
  position: relative;
  display: flex;
}

.skills-carousel-container::before,
.skills-carousel-container::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100px;
  z-index: 2;
  pointer-events: none;
}

.skills-carousel-container::before {
  left: 0;
  background: linear-gradient(to right, var(--bg) 0%, transparent 100%);
}

.skills-carousel-container::after {
  right: 0;
  background: linear-gradient(to left, var(--bg) 0%, transparent 100%);
}

.skills-carousel {
  display: flex;
  gap: 16px;
  animation: scrollCarousel 25s linear infinite;
  white-space: nowrap;
}

.skills-carousel:hover {
  animation-play-state: paused;
}

@keyframes scrollCarousel {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-50% - 8px)); } /* -50% takes us through the first set, -8px for half the gap */
}

/* Timeline */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 0;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 2px;
  background-color: var(--line);
  top: 0;
  bottom: 0;
  left: 20px;
  margin-left: -1px;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  background-color: inherit;
  width: 100%;
  margin-bottom: 20px;
}

.timeline-dot {
  position: absolute;
  width: 16px;
  height: 16px;
  right: -8px;
  background-color: var(--accent-2);
  border: 4px solid var(--bg);
  top: 15px;
  border-radius: 50%;
  z-index: 1;
  left: 12px;
}

.timeline-content {
  padding: 20px 30px;
  background-color: var(--surface);
  position: relative;
  border-radius: 6px;
  border: 1px solid var(--line);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content:hover {
  transform: translateY(-5px);
  border-color: var(--muted);
}

.timeline-content h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 20px;
}

.timeline-content span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 15px;
  font-weight: 500;
}

.timeline-content p {
  margin: 0;
  line-height: 1.6;
}

.skillsGrid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:20px;
}

.skillCard{
  padding:24px;
  border-radius: 0;
  border:1px solid var(--line);
  background:var(--surface);
  box-shadow: none;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.skillCard:hover {
  transform: translateY(-8px);
  border-color: var(--line);
  box-shadow: none;
}

.skillCard h3{
  margin:0 0 10px;
  color: var(--accent-2);
}

.skillCard p{
  margin:0;
  color:var(--muted);
  line-height: 1.5;
}

.experienceGrid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));
  gap:20px;
}

.experienceCard{
  padding:24px;
  border-radius: 0;
  border:1px solid var(--line);
  background:var(--surface);
  transition: transform 0.3s ease, background 0.3s ease;
}

.experienceCard:hover {
  transform: scale(1.02);
  background: var(--surface-2);
  border-color: var(--line);
}

.experienceCard h3{
  margin:0 0 8px;
  font-size: 20px;
}

.experienceCard span{
  display:block;
  color:var(--accent);
  margin-bottom:12px;
  font-size:14px;
  font-weight: 500;
}

.experienceCard p{
  margin:0;
  color:var(--muted);
  line-height: 1.5;
}

/* =========================================
   PROJECT FILTERS
========================================= */
.projectFilters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
  justify-content: center;
}

.filterBtn {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 8px 16px;
  border-radius: 20px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filterBtn:hover {
  background: var(--surface-2);
  border-color: var(--muted);
}

.filterBtn.active {
  background: var(--accent-2);
  color: #fff;
  border-color: var(--accent-2);
}

/* =========================================
   PROJECT CARDS (Projets)
========================================= */
.projectsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
}

.projectCardLink {
  display: block;
  text-decoration: none;
  color: inherit;
}

.projectCard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.projectCard:hover {
  transform: translateY(-10px);
  box-shadow: none;
  border-color: var(--line);
}

.projectImagePlaceholder {
  height: 250px;
  width: 100%;
  overflow: hidden;
  background: #1e243a;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.projectImagePlaceholder::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.05);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.projectCard:hover .projectImagePlaceholder::after {
  opacity: 1;
}

/* Si plus tard vous mettez de vraies images (img au lieu de div placeholder) : */
.projectCard img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.projectCard:hover img {
  transform: scale(1.05);
}

.projectInfo {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.projectInfo h3 {
  margin: 0 0 10px 0;
  font-size: 22px;
  transition: color 0.3s ease;
}

.projectCard:hover .projectInfo h3 {
  color: var(--accent-2);
}

.projectInfo p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 15px;
}

/* =========================================
   PROJECT DETAILS PAGE
========================================= */
.projectHeaderSection {
  padding-top: 40px;
  padding-bottom: 30px;
}

.backLink {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.backLink:hover {
  color: var(--text);
  transform: translateX(-4px);
}

.projectHeaderTitleRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

.projectHeaderTitleRow h1 {
  margin: 0;
  font-size: 38px;
}

.projectExternalLinks {
  display: flex;
  gap: 12px;
}

.projectPills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.projectMainMediaPlaceholder {
  width: 100%;
  height: 400px;
  background: #1e243a;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  margin-bottom: 40px;
  border: 1px solid var(--line);
  box-shadow: none;
}

/* Vraies images/vidéos dans detail projet */
.projectMainMedia {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  border-radius: 0;
  margin-bottom: 40px;
  box-shadow: none;
}

.projectDescription {
  max-width: 800px;
  margin: 0 auto;
}

.projectDescription h2 {
  font-size: 28px;
  margin-top: 0;
  margin-bottom: 20px;
}

.projectDescription h3 {
  font-size: 22px;
  margin-top: 40px;
  margin-bottom: 16px;
  color: var(--accent-2);
}

.projectDescription p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 16px;
  margin-bottom: 20px;
}

.projectDescription ul {
  color: var(--muted);
  line-height: 1.7;
  padding-left: 20px;
}

.projectDescription li {
  margin-bottom: 8px;
}

.projectGallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}

.galleryImagePlaceholder {
  height: 250px;
  background: #1e243a;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  border: 1px solid var(--line);
}

/* =========================================
   CONTACT
========================================= */
.contact{
  background:rgba(255,255,255,0.02);
  border-radius: 0;
  margin: 0 24px 64px;
  padding: 48px;
  border: 1px solid var(--line);
}

.contactGrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:24px;
  align-items:center;
}

.contact h2 {
  margin-top: 0;
}

.contactActions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}

/* =========================================
   FOOTER
========================================= */
.footer{
  border-top:1px solid var(--line);
  padding:32px 0;
  color:var(--muted);
  background: rgba(11,13,18,.95);
}

.footerInner{
  display:flex;
  flex-wrap:wrap;
  align-items: center;
  justify-content:space-between;
  gap:20px;
  font-size: 14px;
}

.footerSocials {
  display: flex;
  gap: 16px;
  align-items: center;
}

.footerSocials a {
  color: var(--muted);
  transition: color 0.3s ease, transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footerSocials a:hover {
  color: var(--text);
  transform: translateY(-3px);
}

/* =========================================
   ANIMATIONS SCROLL (Géré par script.js)
========================================= */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   RESPONSIVE
========================================= */
@media (max-width: 980px){
  .heroGrid{
    grid-template-columns:1fr;
  }
  .contactGrid{
    grid-template-columns:1fr;
  }
  .experienceGrid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px){
  .heroCopy h1{
    font-size:34px;
  }
  .headerInner{
    flex-direction:column;
    gap: 20px;
  }
  .experienceGrid{
    grid-template-columns:1fr;
  }
  .projectsGrid {
    grid-template-columns: 1fr;
  }
  .projectGallery {
    grid-template-columns: 1fr;
  }
  .contact {
    margin: 0 16px 40px;
    padding: 32px 20px;
  }
  .nav {
    justify-content: center;
  }
  .footerInner {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
  .footerSocials {
    order: -1;
    margin-bottom: 12px;
  }
}

.heroContainer {
  padding-bottom: 60px;
}

.project-badge {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-2);
    border: 1px solid var(--accent-2);
    padding: 2px 8px;
    border-radius: 12px;
    align-self: flex-start;
    max-width: max-content;
}


/* Theme Switch */
.theme-switch-wrapper {
  display: flex;
  align-items: center;
  margin-left: 16px;
}
.theme-switch {
  display: inline-block;
  height: 24px;
  position: relative;
  width: 44px;
}
.theme-switch input {
  display: none;
}
.slider {
  background-color: var(--surface-2);
  border: 1px solid var(--line);
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: .4s;
  border-radius: 24px;
}
.slider:before {
  background-color: var(--text);
  bottom: 3px;
  content: "";
  height: 16px;
  left: 4px;
  position: absolute;
  transition: .4s;
  width: 16px;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: var(--accent-2);
  border-color: var(--accent-2);
}
input:checked + .slider:before {
  transform: translateX(18px);
  background-color: #fff;
}

/* Fix for light mode specific images and content if needed */
/* html[data-theme="light"] .logoMarkImg {
  filter: invert(1);
} */
html[data-theme="light"] .projectImagePlaceholder,
html[data-theme="light"] .projectMainMediaPlaceholder {
  background: #e2e8f0;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

.back-to-top:hover {
  background-color: var(--surface);
  transform: translateY(-3px);
  color: var(--accent-2);
  border-color: var(--accent-2);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}
