/* ============================================
   PORTFOLIO — DESIGN SYSTEM
   Theme sombre premium avec glassmorphism
   ============================================ */

/* --- Google Font --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* --- CSS Variables --- */
:root {
  /* --- Backgrounds --- */
  --bg-primary: #020c14;
  --bg-secondary: #061a2a;
  --bg-card: rgba(0, 255, 179, 0.03);
  --bg-card-hover: rgba(0, 255, 179, 0.07);
  --bg-glass: rgba(0, 255, 179, 0.05);
  --border-glass: rgba(0, 255, 179, 0.25);

  /* --- Textes (lisibles sur fond sombre) --- */
  --text-primary: #f0f0f5;
  /* blanc cassé, très lisible */
  --text-secondary: #c8ddd6;
  /* gris vert doux */
  --text-muted: #7abfa0;
  /* gris vert discret */

  /* --- Accents verts (boutons, badges, points) --- */
  --accent-1: #00ffb3;
  --accent-2: #00c896;
  --accent-3: #0a8a6a;
  --gradient-main: linear-gradient(135deg, #00ffb3, #00c896, #0a8a6a);
  --gradient-hover: linear-gradient(135deg, #33ffca, #00e0aa, #0bbf8a);
  --gradient-bg: radial-gradient(circle at 20% 30%, #061a2a, #020c14 70%);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(0, 255, 179, 0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  --nav-height: 72px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, #061a2a, #020c14 70%),
    radial-gradient(ellipse at 80% 10%, rgba(0, 255, 179, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 90%, rgba(0, 200, 150, 0.04) 0%, transparent 50%);
  z-index: -1;
  pointer-events: none;
}

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

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

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

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

/* --- Gradient Text --- */
.gradient-text {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- NAVIGATION --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  transition: var(--transition-smooth);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
}

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

.nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.nav-logo-img {
  height: 50px;
  width: 50px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-links a {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-glass);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition-fast);
}

/* --- HERO SECTION --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: var(--nav-height);
}

.hero-content {
  max-width: 720px;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
  backdrop-filter: blur(10px);
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
  }

  50% {
    opacity: 0.8;
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
  }
}

.hero h1 {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 24px;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 40px;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Floating orbs */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  pointer-events: none;
  animation: float-orb 8s ease-in-out infinite;
}

.hero-orb-1 {
  width: 400px;
  height: 400px;
  background: var(--accent-1);
  top: 10%;
  right: 5%;
  animation-delay: 0s;
}

.hero-orb-2 {
  width: 300px;
  height: 300px;
  background: var(--accent-2);
  bottom: 15%;
  right: 25%;
  animation-delay: -3s;
}

.hero-orb-3 {
  width: 200px;
  height: 200px;
  background: var(--accent-3);
  top: 40%;
  right: 40%;
  animation-delay: -5s;
}

@keyframes float-orb {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(20px, -30px) scale(1.05);
  }

  66% {
    transform: translate(-15px, 20px) scale(0.95);
  }
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-main);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(124, 58, 237, 0.3);
}

.btn-secondary {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* --- SECTION STYLES --- */
.section {
  padding: 100px 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-label {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent-2);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

/* --- ABOUT SECTION --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-text h3 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.8;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.skill-card {
  padding: 20px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
}

.skill-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.skill-card .skill-icon {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.skill-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.skill-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.about-visual {
  display: flex;
  justify-content: center;
}

.about-avatar {
  width: 300px;
  height: 480px;
  border-radius: var(--radius-xl);
  background: transparent;
  /* ← transparent */
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  overflow: visible;
  /* ← visible pour voir le contour */
}

.about-avatar::after {
  display: none;
  /* ← supprimé, plus besoin */
}

.about-avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #00ffb3, #00c896, #0a8a6a);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  overflow: hidden;
  position: relative;
  outline: 3px solid;
  outline-color: transparent;
  background-clip: padding-box;
  box-shadow:
    0 0 0 8px var(--bg-primary),
    0 0 0 11px rgba(0, 255, 179, 0.55),
    0 0 0 13px rgba(0, 200, 150, 0.25),
    0 0 30px rgba(0, 255, 179, 0.15);
}

.about-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Stats bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
  padding: 32px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- PROJECTS SECTION --- */
.filter-bar {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: var(--transition-fast);
}

.filter-btn:hover {
  color: var(--text-primary);
  background: var(--bg-glass);
}

.filter-btn.active {
  color: #fff;
  background: var(--gradient-main);
  box-shadow: var(--shadow-glow);
}

/* --- TIMELINE ALTERNÉE --- */
.timeline {
  position: relative;
  padding: 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, #00ffb3, transparent);
}

.timeline-item {
  position: relative;
  width: 50%;
  margin-bottom: 5px;
}

.timeline-item:nth-child(odd) {
  left: 0;
  padding-right: 48px;
  padding-left: 0;
}

.timeline-item:nth-child(even) {
  left: 50%;
  padding-left: 48px;
  padding-right: 0;
}

.timeline-dot {
  position: absolute;
  top: 40px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #00ffb3;
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 10px rgba(0, 255, 179, 0.5);
  z-index: 2;
}

.timeline-item:nth-child(odd) .timeline-dot {
  right: -7px;
  left: auto;
}

.timeline-item:nth-child(even) .timeline-dot {
  left: -7px;
  right: auto;
}

.timeline-date {
  font-size: 0.82rem;
  color: #00ffb3;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.timeline-card {
  padding: 24px;
  background: var(--bg-glass);
  border: 1px solid rgba(0, 255, 179, 0.1);
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
}

.timeline-card:hover {
  transform: translateX(4px);
  border-color: rgba(0, 255, 179, 0.25);
  box-shadow: 0 0 20px rgba(0, 255, 179, 0.08);
}

.timeline-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #f0f0f5;
}

.timeline-company {
  font-size: 0.85rem;
  color: #7abfa0;
  font-weight: 500;
  display: block;
  margin-bottom: 10px;
}

.timeline-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.6;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-tags span {
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 100px;
  background: rgba(0, 255, 179, 0.06);
  border: 1px solid rgba(0, 255, 179, 0.15);
  color: #7abfa0;
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 768px) {
  .timeline::before {
    left: 12px;
  }

  .timeline-item,
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    width: 100%;
    left: 0;
    padding-left: 36px;
    padding-right: 0;
  }

  .timeline-item:nth-child(odd) .timeline-dot,
  .timeline-item:nth-child(even) .timeline-dot {
    left: 5px;
    right: auto;
  }

  .timeline-card:hover {
    transform: translateX(4px);
  }
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}

.project-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
  opacity: 0;
  transform: translateY(30px);
}

.project-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: rgba(124, 58, 237, 0.3);
}

.project-image {
  height: 200px;
  position: relative;
  overflow: hidden;
}

.project-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.project-image-placeholder.cat-reseaux {
  background: linear-gradient(135deg, #1e1b4b, #312e81);
}

.project-image-placeholder.cat-cloud {
  background: linear-gradient(135deg, #042f2e, #115e59);
}

.project-image-placeholder.cat-securite {
  background: linear-gradient(135deg, #4a0724, #831843);
}

.project-image-placeholder.cat-voip {
  background: linear-gradient(135deg, #1a2e05, #365314);
}

.project-image-placeholder.cat-dev {
  background: linear-gradient(135deg, #1c1917, #44403c);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

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

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  transition: var(--transition-smooth);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-overlay a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  transition: var(--transition-fast);
  transform: translateY(10px);
}

.project-card:hover .project-overlay a {
  transform: translateY(0);
}

.project-overlay a:hover {
  background: var(--accent-1);
  border-color: var(--accent-1);
}

.project-body {
  padding: 24px;
}

.project-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.project-body p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.6;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tech span {
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 100px;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.2);
  color: #a78bfa;
}

/* Featured badge */
.project-featured {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 12px;
  border-radius: 100px;
  background: var(--gradient-main);
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
  z-index: 2;
  letter-spacing: 0.5px;
}

/* --- CONTACT SECTION --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.contact-info p {
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.8;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
}

.contact-link:hover {
  background: var(--bg-card-hover);
  transform: translateX(8px);
  border-color: var(--accent-1);
}

.contact-link .link-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(124, 58, 237, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.contact-link .link-text h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.contact-link .link-text p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}

/* Contact form */
.contact-form {
  padding: 36px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition-fast);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-1);
  background: rgba(124, 58, 237, 0.05);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.form-group textarea {
  min-height: 130px;
  resize: vertical;
}

.form-submit {
  width: 100%;
  padding: 16px;
  background: var(--gradient-main);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.form-submit:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* --- FOOTER --- */
.footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--border-glass);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  font-size: 1.3rem;
  font-weight: 800;
}

.footer-logo-img {
  height: 50px;
  width: 50%;
  object-fit: contain;
}


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

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  font-size: 1.1rem;
}

.footer-social a:hover {
  background: var(--accent-1);
  border-color: var(--accent-1);
  transform: translateY(-4px);
}

/* --- SCROLL ANIMATIONS --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* --- SCROLL TO TOP --- */
.scroll-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-main);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition-smooth);
  z-index: 900;
  cursor: pointer;
  border: none;
}

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

.scroll-top:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-visual {
    order: -1;
  }

  .about-avatar {
    width: 260px;
    height: 340px;
  }

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

  .stats-bar {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 24px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    padding: 16px;
    border-bottom: 1px solid var(--border-glass);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .hero h1 {
    font-size: 2.4rem;
    letter-spacing: -1px;
  }

  .timeline::before {
    left: 12px;
  }

  .timeline-item,
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    width: 100%;
    left: 0;
    padding-left: 36px;
    padding-right: 0;
  }

  .timeline-item:nth-child(odd) .timeline-dot,
  .timeline-item:nth-child(even) .timeline-dot {
    left: 5px;
    right: auto;
  }

  .timeline-card:hover {
    transform: translateX(4px);
  }

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

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-content {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .floating-icons {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .stats-bar {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    gap: 6px;
  }

  .filter-btn {
    padding: 6px 14px;
    font-size: 0.82rem;
  }
}

/* --- CANVAS BACKGROUNDS --- */
#electric-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.7;
}

#rain-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.15;
}

.hero .container,
.hero-content {
  position: relative;
  z-index: 2;
}

/* --- FLOATING ICONS BACKGROUND --- */
.floating-icons {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.fi {
  position: absolute;
  font-size: 1.8rem;
  opacity: 0.06;
  animation: float-icon linear infinite;
  filter: grayscale(1) brightness(2);
}

/* Position et taille uniques pour chaque icône */
.fi-1 {
  left: 5%;
  top: 15%;
  font-size: 2rem;
  animation-duration: 18s;
  animation-delay: 0s;
}

.fi-2 {
  left: 12%;
  top: 78%;
  font-size: 1.5rem;
  animation-duration: 22s;
  animation-delay: -4s;
}

.fi-3 {
  left: 40%;
  top: 45%;
  font-size: 2.2rem;
  animation-duration: 16s;
  animation-delay: -8s;
}

.fi-4 {
  left: 20%;
  top: 60%;
  font-size: 1.8rem;
  animation-duration: 20s;
  animation-delay: -2s;
}

.fi-5 {
  left: 20%;
  top: 25%;
  font-size: 2rem;
  animation-duration: 24s;
  animation-delay: -6s;
}

.fi-6 {
  left: 82%;
  top: 70%;
  font-size: 1.6rem;
  animation-duration: 19s;
  animation-delay: -10s;
}

.fi-7 {
  left: 82%;
  top: 35%;
  font-size: 2.2rem;
  animation-duration: 17s;
  animation-delay: -3s;
}

.fi-8 {
  left: 92%;
  top: 82%;
  font-size: 1.5rem;
  animation-duration: 21s;
  animation-delay: -7s;
}

.fi-9 {
  left: 75%;
  top: 22%;
  font-size: 2rem;
  animation-duration: 23s;
  animation-delay: -5s;
}

/* 🔥 déplacé hors centre */
.fi-10 {
  left: 65%;
  top: 55%;
  font-size: 1.7rem;
  animation-duration: 25s;
  animation-delay: -9s;
}

@keyframes float-icon {
  0% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.10;
  }

  25% {
    transform: translateY(-20px) rotate(5deg);
    opacity: 0.11;
  }

  50% {
    transform: translateY(-10px) rotate(-5deg);
    opacity: 0.10;
  }

  75% {
    transform: translateY(-25px) rotate(3deg);
    opacity: 0.10;
  }

  100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.10;
  }
}