/* =========================================
   1. VARIABLES & THÈME
   ========================================= */
:root {
  --bg-color: #0f172a;
  --surface-color: #1e293b;
  --surface-hover: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;

  --accent-primary: #38bdf8;
  --accent-secondary: #34d399;
  --accent-glow: rgba(56, 189, 248, 0.3);

  --font-main: "Montserrat", sans-serif;
  --font-code: "Fira Code", monospace;

  --nav-height: 70px;
  --border-radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light-mode {
  --bg-color: #f8fafc;
  --surface-color: #ffffff;
  --surface-hover: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;

  --accent-primary: #0284c7;
  --accent-secondary: #059669;
  --accent-glow: rgba(2, 132, 199, 0.15);
}

/* =========================================
   2. RESET & BASE
   ========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition:
    background-color 0.5s ease,
    color 0.5s ease;
}

::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: var(--surface-hover);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

#neural-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.6;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(
    to right,
    var(--accent-primary),
    var(--accent-secondary)
  );
  width: 0%;
  z-index: 1001;
  transition: width 0.1s;
}

/* =========================================
   3. HEADER & NAVIGATION
   ========================================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition);
}

body.light-mode .header {
  background: rgba(255, 255, 255, 0.5);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-container {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo svg text {
  fill: var(--text-primary);
  transition: fill 0.3s ease;
}

.nav {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-primary);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-primary);
  transition: width 0.3s ease;
}

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

.header-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
}

button.lang-toggle,
button.dark-mode-toggle {
  background: none;
  border: 1px solid var(--surface-hover);
  color: var(--text-primary);
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-family: var(--font-code);
  font-size: 0.9rem;
}

button.lang-toggle:hover,
button.dark-mode-toggle:hover {
  border-color: var(--accent-primary);
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-primary);
}

.moon-icon {
  display: block;
}
.sun-icon {
  display: none;
}

body.light-mode .moon-icon {
  display: none;
}
body.light-mode .sun-icon {
  display: block;
}

.lang-en {
  display: none !important;
}
body.lang-en-active .lang-fr {
  display: none !important;
}
body.lang-en-active .lang-en {
  display: inline !important;
}

/* =========================================
   4. HERO SECTION (ACCUEIL)
   ========================================= */
.hero {
  height: 100vh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding-top: var(--nav-height);
  text-align: center;
}

.hero-content {
  text-align: center;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -1px;
  min-height: 1.2em;
}

.cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background-color: var(--accent-primary);
  animation: blink 1s infinite;
  margin-left: 5px;
  vertical-align: middle;
}

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

.hero-subtitle {
  font-family: var(--font-code);
  font-size: 1.2rem;
  color: var(--accent-secondary);
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-tagline {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  line-height: 1.8;
}

.hero-tagline strong {
  color: var(--text-primary);
  font-weight: 600;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.8rem 2rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-main);
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  color: #fff;
  border: none;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--surface-hover);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-3px);
}

.hero-socials {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.hero-socials a {
  color: var(--text-secondary);
  padding: 0.5rem;
  border-radius: 25%;
  transition: var(--transition);
  background: transparent;
}

.hero-socials a:hover {
  color: var(--accent-primary);
  background: rgba(56, 189, 248, 0.1);
  transform: scale(1.1);
}

/* =========================================
   INDICATEUR DE SCROLL
   ========================================= */

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
  opacity: 1;
}

.scroll-indicator.hidden {
  opacity: 0;
  transform: translate(-50%, 20px);
  pointer-events: none;
}

.scroll-text {
  font-family: var(--font-code);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.8;
}

.scroll-arrow {
  width: 30px;
  height: 30px;
  color: var(--accent-primary);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   LOGOS PARTENAIRES
   ========================================= */
.logo-strip {
  background: transparent;
  padding: 2rem 0;
}

.logo-text {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-family: var(--font-code);
}

.logo-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3rem;
  align-items: center;
}

.trust-logo {
  height: 45px;
  width: auto;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  filter: grayscale(100%);
  opacity: 0.5;
}

body:not(.light-mode) .trust-logo {
  filter: grayscale(100%);
  opacity: (0.6);
}

body.light-mode .trust-logo {
  filter: grayscale(100%);
  opacity: 0.6;
}

body.light-mode .trust-logo:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.1);
  cursor: pointer;
}

body:not(.light-mode) .trust-logo:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.1);
  cursor: pointer;
}

/* =========================================
   6. SECTIONS GLOBALES
   ========================================= */
.section {
  padding: 6rem 0;
  position: relative;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 4rem;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--accent-primary);
  border-radius: 2px;
}

/* =========================================
   7. PROJETS (GRID & CARDS)
   ========================================= */
.projects-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .project-card.featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 400px 1fr;
    align-items: center;
    gap: 3rem;
  }
}

.project-card {
  background: var(--surface-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.15) !important;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease !important;
}

.project-card:hover {
  transform: translateY(-5px) !important;
  border-color: var(--accent-primary);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3) !important;
}

.project-visual {
  width: 100%;
  height: 250px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  background: var(--bg-color);
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  pointer-events: auto;
}

@media (min-width: 1024px) {
  .project-card.featured .project-visual {
    height: 100%;
    min-height: 300px;
    margin-bottom: 0;
  }
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-img {
  transform: scale(1.05);
}

.project-card:hover .visual-abstract svg {
  transform: scale(1.1) rotate(5deg);
  opacity: 1;
}

.visual-code {
  background-color: #0f172a;
  padding: 1.5rem;
  font-family: "Fira Code", monospace;
  font-size: 0.8rem;
  color: #cbd5e1;

  display: flex;
  flex-direction: column;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background-color 0.3s ease;
  position: relative;
  overflow: hidden;
}

.visual-code::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-secondary);
  opacity: 0.6;
}

body.light-mode .visual-code {
  background-color: #f1f5f9;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  color: #334155;
}

.code-line {
  display: block;
  margin-bottom: 0.4rem;
  line-height: 1.4;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.code-keyword {
  color: #c678dd;
  font-weight: 600;
}
body.light-mode .code-keyword {
  color: #9333ea;
}

.code-func {
  color: #61afef;
}
body.light-mode .code-func {
  color: #0284c7;
}

.code-string {
  color: #98c379;
}
body.light-mode .code-string {
  color: #16a34a;
}

.project-card:hover .code-line {
  transform: translateX(5px);
  transition: transform 0.5s ease;
}

.visual-comparison {
  position: relative;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

.visual-comparison > div {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  transition:
    opacity 0.75s ease,
    transform 0.75s ease;
}

.visual-comparison img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.visual-comparison .label {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  padding: 4px 12px;
  font-size: 0.7rem;
  font-family: var(--font-code);
  border-radius: 20px;
  pointer-events: none;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 4;
  backdrop-filter: blur(4px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.visual-comparison > div:first-child {
  z-index: 2;
  opacity: 1;
  transform: scale(1);
}

.visual-comparison > div:nth-child(2) {
  z-index: 1;
  opacity: 0;
  transform: scale(1);
}

.visual-comparison > div:first-child .label {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.visual-comparison > div:nth-child(2) .label {
  opacity: 0;
  transform: translateX(-50%) translateY(4px);
}

.project-card:hover .visual-comparison > div:nth-child(2) {
  opacity: 1;
  z-index: 5;
  transform: scale(1.02);
}

.project-card:hover .visual-comparison > div:first-child {
  opacity: 0;
  transform: scale(0.98);
}

.project-card:hover .visual-comparison > div:nth-child(2) .label {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

.project-card:hover .visual-comparison > div:first-child .label {
  opacity: 0;
  transform: translateX(-50%) translateY(4px);
}

.project-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  gap: 1rem;
}

.project-card h3 {
  font-size: 1.4rem;
  color: var(--text-primary);
  line-height: 1.3;
  margin: 0;
}

.project-card:hover .visual-abstract svg {
  transform: rotate(15deg) scale(1.1);
  opacity: 1;
}

.badge {
  background: transparent;
  color: var(--accent-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-family: var(--font-code);
  border: 1px solid var(--accent-primary);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  height: fit-content;
  cursor: default;
}

.badge:hover {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: 0 4px 15px var(--accent-glow);
  border-color: var(--accent-primary);
  cursor: default;
}

.context {
  font-family: var(--font-code);
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-bottom: 1.5rem;
  opacity: 0.8;
}

.desc {
  margin-bottom: 2rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  flex-grow: 1;
}

.desc strong {
  color: var(--text-primary);
  font-weight: 600;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.tags span {
  font-family: var(--font-code);
  font-size: 0.75rem;
  color: var(--accent-secondary);
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.2);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  transition: all 0.2s;
  cursor: default;
}

.project-card:hover .tags span {
  border-color: rgba(52, 211, 153, 0.5);
  background: rgba(52, 211, 153, 0.1);
}

.tags span:hover {
  border-color: rgba(52, 211, 153, 0.5);
  background: rgba(52, 211, 153, 1) !important;
  box-shadow: 0 4px 15px rgba(52, 211, 153, 0.3);
  color: #ffffff;
  cursor: default;
}

.card-links {
  display: flex;
  gap: 1.5rem;
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.link-text {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  text-decoration: none;
  padding-bottom: 5px;
}

.link-text span {
  display: inline-block;
  transition: transform 0.3s ease;
}

.link-text:hover span {
  transform: translateX(4px);
}

.link-text::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-primary);
  transition: width 0.3s ease;
}

.link-text:hover::after {
  width: 100%;
}

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

.link-text:hover span {
  transform: translateX(4px);
  transition: transform 0.3s ease;
}

/* =========================================
   8. TIMELINE
   ========================================= */

.timeline {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 0;
}

.timeline-line {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    var(--accent-primary),
    var(--accent-secondary)
  );
}

.timeline-item {
  position: relative;
  margin-bottom: 4rem;
  width: 100%;
}

.timeline-dot {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  background: var(--bg-color);
  border: 2px solid var(--accent-primary);
  border-radius: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.1);
  transition: all 0.3s ease;
}

.timeline-dot svg {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.timeline-item:hover .timeline-dot {
  background: var(--bg-color);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.1);
  transform: translateX(-50%) scale(1);
}
.timeline-item:hover .timeline-dot svg {
  color: var(--text-secondary);
}

.timeline-item:has(.timeline-content:hover) .timeline-dot {
  background: var(--accent-primary) !important;
  box-shadow: 0 0 0 6px rgba(56, 189, 248, 0.2) !important;
  transform: translateX(-50%) scale(1.1) !important;
}

.timeline-item:has(.timeline-content:hover) .timeline-dot svg {
  color: #fff !important;
}

.timeline-dot:hover {
  background: var(--accent-primary) !important;
  box-shadow: 0 0 0 6px rgba(56, 189, 248, 0.2) !important;
  transform: translateX(-50%) scale(1.1) !important;
  cursor: default;
  z-index: 10;
}

.timeline-dot:hover svg {
  color: #fff !important;
}

.timeline-date {
  position: absolute;
  top: 8px;
  font-family: var(--font-code);
  color: var(--accent-primary);
  font-weight: 700;
  width: 50%;
  padding: 0 3rem;
  left: 50%;
  text-align: left;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.timeline-content {
  position: relative;
  width: 44%;
  background: var(--surface-color);
  padding: 2rem;
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.15) !important;
  margin-left: 0;
  margin-right: auto;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.timeline-content::after {
  content: "";
  position: absolute;
  top: 20px;
  right: -8px;
  width: 16px;
  height: 16px;
  background: var(--surface-color);
  transform: rotate(45deg);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.timeline-content:hover {
  transform: translateY(-5px) !important;
  border-color: var(--accent-primary);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3) !important;
}

.timeline-content h3 {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-size: 1.2rem;
}

.timeline-content h4 {
  color: var(--accent-secondary);
  font-family: var(--font-code);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.timeline-list {
  margin-top: 1rem;
  padding-left: 1.2rem;
  list-style: none;
}

.timeline-list li {
  position: relative;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.timeline-list li::before {
  content: "▹";
  position: absolute;
  left: -1.2rem;
  color: var(--accent-primary);
}

.timeline-item:nth-child(even) .timeline-content {
  margin-left: auto;
  margin-right: 0;
}

.timeline-item:nth-child(even) .timeline-content::after {
  right: auto;
  left: -8px;
  border-top: none;
  border-right: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.timeline-item:nth-child(even) .timeline-date {
  left: 0;
  text-align: right;
}

.timeline-content {
  position: relative;
  width: 44%;
  background: var(--surface-color);
  padding: 2rem;
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-left: 0;
  margin-right: auto;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

/* Timeline logo (placed inside each timeline-content) */
.timeline-content .timeline-logo {
  position: absolute;
  top: 12px;
  right: 12px;
  left: auto;
  transform: translateY(0) scale(1);
  transform-origin: center;
  width: 100px;
  height: auto;
  max-height: 72px;
  opacity: 1;
  transition:
    transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.22s ease;
  pointer-events: none;
  z-index: 10;
}

.timeline-content .timeline-logo img,
.timeline-content .timeline-logo svg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.timeline-content:hover .timeline-logo {
  transform: scale(1.06);
}

/* =========================================
   RESPONSIVE MOBILE (Timeline)
   ========================================= */
@media (max-width: 768px) {
  .timeline-line {
    left: 30px;
  }

  .timeline-dot {
    left: 30px;
  }

  .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    width: calc(100% - 70px);
    margin-left: 70px;
    margin-right: 0;
  }

  .timeline-content::after,
  .timeline-item:nth-child(even) .timeline-content::after {
    left: -8px;
    right: auto;
    border-top: none;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
  }

  .timeline-date,
  .timeline-item:nth-child(even) .timeline-date {
    position: relative;
    left: 70px;
    width: auto;
    text-align: left;
    margin-bottom: 0.5rem;
    top: -5px;
    padding: 0;
  }

  .timeline-item {
    margin-bottom: 3rem;
  }
}

/* =========================================
   9. COMPÉTENCES (Style Dashboard)
   ========================================= */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.skill-box {
  background: var(--surface-color);
  padding: 2rem;
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.15) !important;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.skill-box:hover {
  transform: translateY(-5px) !important;
  border-color: var(--accent-primary) !important;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3) !important;
}

.skill-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.skill-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.skill-icon-wrapper {
  width: 45px;
  height: 45px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.skill-icon-wrapper svg {
  width: 22px;
  height: 22px;
}

.skill-icon-wrapper.blue {
  background: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
}
.skill-icon-wrapper.green {
  background: rgba(52, 211, 153, 0.1);
  color: #34d399;
}
.skill-icon-wrapper.purple {
  background: rgba(192, 132, 252, 0.1);
  color: #c084fc;
}
.skill-icon-wrapper.orange {
  background: rgba(251, 146, 60, 0.1);
  color: #fb923c;
}

.skill-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.skill-list li {
  color: var(--text-secondary);
  font-size: 0.95rem;
  display: flex;
  align-items: relative;
  line-height: 1.5;
}

.skill-list li::before {
  content: "▹";
  color: var(--accent-primary);
  font-weight: bold;
  margin-right: 0.8rem;
  transform: translateY(1px);
}

.skill-list li strong {
  color: var(--text-primary);
  font-weight: 600;
}

.skill-box.highlight-box {
  background: linear-gradient(
    160deg,
    var(--surface-color) 0%,
    rgba(56, 189, 248, 0.03) 100%
  );
  border: 1px solid rgba(56, 189, 248, 0.15);
}

body.light-mode .skill-box {
  background: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
body.light-mode .skill-box.highlight-box {
  background: linear-gradient(160deg, #ffffff 0%, #f0f9ff 100%);
  border-color: rgba(2, 132, 199, 0.2);
}

/* =========================================
   10. FOOTER
   ========================================= */

.footer {
  padding: 3rem 0;
  background: var(--surface-color);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 4rem;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.1rem;
}

.footer-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-family: var(--font-code);
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-secondary);
  border-radius: 50%;
  box-shadow: 0 0 0 rgba(52, 211, 153, 0.4);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% {
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.4);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(52, 211, 153, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0);
  }
}

/* Réseaux Sociaux (Centre) */
.footer-socials {
  display: flex;
  gap: 1.5rem;
}

.footer-socials a {
  color: var(--text-secondary);
  padding: 0.5rem;
  border-radius: 25%;
  transition: var(--transition);
  background: transparent;
}

.footer-socials a:hover {
  color: var(--accent-primary);
  background: rgba(56, 189, 248, 0.1);
  transform: scale(1.1);
}

.align-right {
  text-align: right;
}

.copyright {
  font-family: var(--font-code);
  opacity: 0.7;
  font-size: 0.8rem;
}

@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  .align-right {
    text-align: center;
  }

  .footer-socials {
    order: -1;
  }
}

/* =========================================
   BOUTONS FLOTTANTS
   ========================================= */

.scroll-to-top,
.floating-cta {
  position: fixed;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 900;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.floating-cta {
  bottom: 2rem;
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  color: white;
  border: none;
  box-shadow: 0 4px 15px var(--accent-glow);
  animation: pulse-cta 3s infinite;
}

.floating-cta:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 8px 25px var(--accent-glow);
}

.scroll-to-top {
  bottom: 6rem;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  background: var(--surface-hover);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-5px);
}

body.light-mode .scroll-to-top {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

@keyframes pulse-cta {
  0% {
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(56, 189, 248, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0);
  }
}

@media (max-width: 768px) {
  .scroll-to-top,
  .floating-cta {
    right: 1.5rem;
    bottom: 1.5rem;
  }

  .scroll-to-top {
    bottom: 5rem;
  }
}

/* =========================================
   11. MODALES (Contact & Lightbox)
   ========================================= */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.modal-content {
  background: var(--surface-color);
  padding: 3rem;
  border-radius: 16px;
  position: relative;
  width: 100%;
  max-width: 500px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2001;
}

.fullscreen-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
  z-index: 100 !important;
  backdrop-filter: blur(4px);
  pointer-events: all;
}
.fullscreen-btn svg {
  width: 16px;
  height: 16px;
}
.fullscreen-btn:hover {
  transform: scale(1.05);
  background: rgba(56, 189, 248, 0.12);
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.08);
  color: var(--accent-primary);
}

.modal.active .modal-content {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.2s ease;
  display: flex;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  transform: rotate(90deg);
}

.modal-content h2 {
  margin-bottom: 2rem;
  font-size: 1.8rem;
  text-align: center;
  background: linear-gradient(
    to right,
    var(--accent-primary),
    var(--accent-secondary)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-left: 4px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  background: var(--bg-color);
  border: 2px solid transparent;
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  background: var(--surface-hover);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.btn-submit {
  width: 100%;
  justify-content: center;
  padding: 1rem;
  font-size: 1.1rem;
  margin-top: 1rem;
}

body.light-mode .modal-content {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

body.light-mode .form-group input,
body.light-mode .form-group textarea {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

body.light-mode .form-group input:focus,
body.light-mode .form-group textarea:focus {
  background: #ffffff;
  border-color: var(--accent-primary);
}

body.light-mode .modal-close:hover {
  background: rgba(0, 0, 0, 0.05);
}

.visual-expand-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  z-index: 20;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}
.visual-expand-btn:hover {
  transform: scale(1.05);
  background: rgba(0, 0, 0, 0.6);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
}

.lightbox-img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
}

.lightbox-close:hover {
  transform: rotate(90deg);
  transition: all 0.2s ease;
}
/* =========================================
   12. MEDIA QUERIES (Responsive Mobile)
   ========================================= */
@media (max-width: 768px) {
  .section-title {
    font-size: 2rem;
  }

  .hero-title {
    font-size: 2.2rem;
  }
  .hero-buttons {
    flex-direction: column;
  }
  .btn {
    width: 100%;
    justify-content: center;
  }

  .timeline-line {
    left: 20px;
  }
  .timeline-dot {
    left: 20px;
  }

  .timeline-item {
    margin-bottom: 3rem;
  }

  .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    width: calc(100% - 60px);
    margin-left: 60px;
    margin-right: 0;
  }

  .timeline-date,
  .timeline-item:nth-child(even) .timeline-date {
    position: relative;
    top: 0;
    left: 60px;
    width: auto;
    text-align: left;
    margin-bottom: 0.5rem;
    display: block;
  }

  .nav {
    display: none;
  }

  .header .container {
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
  }
}

/* =========================================
   SECTION À PROPOS (Style Box)
   ========================================= */

.about-card {
  background: var(--surface-color);
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.15) !important;
  padding: 3rem;
  transition: var(--transition) !important;
}

.about-card:hover {
  transform: translateY(-8px) !important;
  border-color: var(--accent-primary);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3) !important;
}

.about-content {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image-wrapper {
  width: 300px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-img {
  width: 100%;
  height: 100%;
  border-radius: var(--border-radius);
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.15) !important;
  transition: var(--transition);
}

.about-subtitle {
  font-size: 1.5rem;
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.8;
}

.about-text strong {
  color: var(--text-primary);
}

.about-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.info-icon {
  width: 24px;
  height: 24px;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.info-item svg {
  margin-top: 3px;
}

.info-item div {
  display: flex;
  flex-direction: column;
}

.text-muted {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-family: var(--font-code);
}

@media (max-width: 900px) {
  .about-card {
    padding: 2rem;
  }

  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .about-image-wrapper {
    margin: 0 auto;
    width: 250px;
    height: 250px;
  }

  .about-text p {
    text-align: left;
  }

  .about-info-grid {
    justify-items: start;
  }
}

/* --- ---------------------------------------
   13. QUICK STACK SKILLS
   ========================================= */

.quick-stack {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.stack-label {
  font-family: var(--font-code);
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.stack-flex {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.stack-badge {
  background: var(--surface-color);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-family: var(--font-code);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
  cursor: default;
}

.stack-badge:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-2px);
  background: rgba(56, 189, 248, 0.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Adaptation Light Mode */
body.light-mode .stack-badge {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

body.light-mode .stack-badge:hover {
  background: #f0f9ff;
  border-color: var(--accent-primary);
}

/* --- ---------------------------------------
   14. Tech Watch
   ========================================= */

.watch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.watch-card {
  background: var(--surface-color);
  padding: 2rem;
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.15);
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
  will-change: transform, box-shadow;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.watch-card:hover {
  border-color: var(--accent-secondary);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}

.watch-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  color: var(--accent-secondary);
}

.watch-icon {
  width: 28px;
  height: 28px;
}

.watch-list {
  list-style: none;
  padding: 0;
}

.watch-list li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
  padding-left: 1.5rem;
  position: relative;
}

.watch-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent-secondary);
}
