/* =========================================================
   GLOBAL PORTFOLIO CSS — Firdaws Cissé (DYNAMIC LIGHT THEME)
========================================================= */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700;800&display=swap");

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; max-width: 100vw; }
body { 
  font-family: "Inter", "Segoe UI", sans-serif; 
  background: #102830; /* Midnight Forest — légèrement éclairci */
  color: #cbd5e1;
  overflow-x: hidden;
  max-width: 100vw;
  -webkit-font-smoothing: antialiased; 
}

:root {
  --primary: #10b981; --primary-light: #34d399; --primary-soft: rgba(16, 185, 129, 0.15);
  --accent: #0ea5e9; --accent-soft: rgba(14, 165, 233, 0.15);
  --coral: #f43f5e; --coral-soft: rgba(244, 63, 94, 0.15);
  --violet: #8b5cf6; --violet-soft: rgba(139, 92, 246, 0.15);
  --gold: #f59e0b; --gold-soft: rgba(245, 158, 11, 0.15);
  --emerald: #10b981; --emerald-soft: rgba(16, 185, 129, 0.15);
  
  /* Glassmorphism surfaces */
  --surface: rgba(20, 55, 65, 0.75); 
  --surface-2: rgba(20, 55, 65, 0.95); 
  --surface-3: rgba(28, 70, 82, 0.8);
  
  --border: rgba(255, 255, 255, 0.1); 
  --border-hover: rgba(16, 185, 129, 0.45);
  --text-primary: #f0fdf4; --text-secondary: #a7c5bd; --text-muted: #5e8a7e;
  
  /* Rich Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.35), 0 4px 10px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.45), 0 8px 16px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 35px rgba(16, 185, 129, 0.3), 0 10px 25px rgba(16, 185, 129, 0.2);
  
  --radius-sm: 8px; --radius-md: 14px; --radius-lg: 20px; --radius-xl: 28px;
  --transition-fast: .2s cubic-bezier(.4, 0, .2, 1);
  --transition-smooth: .4s cubic-bezier(.4, 0, .2, 1);
  --transition-spring: .6s cubic-bezier(.34, 1.56, .64, 1);
  --navbar-h: 72px;
  
  --grad-main: linear-gradient(135deg, #10b981, #0ea5e9, #059669);
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0d2830; }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* NAVBAR */
.navbar { 
  height: var(--navbar-h); display: flex; align-items: center; padding: 0 48px; 
  position: fixed; top: 0; left: 0; right: 0; z-index: 100; 
  background: var(--surface); 
  backdrop-filter: blur(24px) saturate(180%); 
  -webkit-backdrop-filter: blur(24px) saturate(180%); 
  border-bottom: 1px solid var(--border); 
  transition: all var(--transition-smooth); 
}
.navbar.scrolled { box-shadow: var(--shadow-sm); background: var(--surface-2); }
.logo { 
  text-decoration: none; font-family: "Space Grotesk", sans-serif; font-size: 26px; 
  font-weight: 800; color: var(--text-primary); letter-spacing: -0.5px; 
  transition: all var(--transition-spring); flex-shrink: 0; 
}
.logo:hover { transform: scale(1.05); }
.logo span { background: var(--grad-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.nav-links { display: flex; align-items: center; justify-content: center; gap: 4px; flex: 1; }
.nav-link { 
  text-decoration: none; color: var(--text-secondary); font-size: 14px; font-weight: 600; 
  padding: 8px 16px; border-radius: 50px; transition: all var(--transition-fast); 
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 4px;
}
.nav-link::before {
  content: ''; position: absolute; inset: 0; background: var(--primary-soft); 
  border-radius: 50px; transform: scale(0.8); opacity: 0; transition: all var(--transition-spring); z-index: -1;
}
.nav-link:hover { color: var(--primary); }
.nav-link:hover::before { transform: scale(1); opacity: 1; }
.nav-link.active { color: var(--primary); background: var(--primary-soft); }

/* Dropdowns */
.nav-item { position: relative; }
.dropdown-menu {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(10px);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 8px; min-width: 160px;
  box-shadow: var(--shadow-md); opacity: 0; visibility: hidden;
  transition: all var(--transition-fast); z-index: 100;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.nav-item:hover .dropdown-menu {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.dropdown-link {
  display: block; padding: 10px 16px; color: var(--text-secondary);
  text-decoration: none; font-size: 14px; font-weight: 500;
  border-radius: var(--radius-sm); transition: all var(--transition-fast);
}
.dropdown-link:hover {
  background: var(--primary-soft); color: var(--primary);
}

.cv-button { 
  display: flex; align-items: center; gap: 8px; padding: 10px 22px; border: none; 
  border-radius: 50px; text-decoration: none; color: #fff; font-size: 14px; font-weight: 700; 
  background: var(--grad-main); background-size: 200% auto; transition: all var(--transition-spring); 
  flex-shrink: 0; box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4); 
}
.cv-button:hover { background-position: right center; transform: translateY(-3px) scale(1.02); box-shadow: var(--shadow-glow); }
.cv-icon { width: 16px; height: 16px; animation: bounce 2s infinite; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }

.menu-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; background: none; border: none; cursor: pointer; z-index: 101; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: all var(--transition-fast); }
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* PAGE WRAPPER ANIMATED BACKGROUND */
.page-wrapper { min-height: 100vh; position: relative; overflow: hidden; }
.page-wrapper::before, .page-wrapper::after {
  content: ''; position: absolute; pointer-events: none; z-index: 0; filter: blur(80px);
}
.page-wrapper::before {
  top: -10%; left: -10%; width: 50vw; height: 50vw; 
  background: radial-gradient(circle, rgba(129, 140, 248, 0.4) 0%, transparent 60%);
  animation: float1 15s ease-in-out infinite alternate;
}
.page-wrapper::after {
  bottom: -10%; right: -10%; width: 60vw; height: 60vw; 
  background: radial-gradient(circle, rgba(14, 165, 233, 0.3) 0%, rgba(244, 63, 94, 0.2) 40%, transparent 70%);
  animation: float2 20s ease-in-out infinite alternate;
}
@keyframes float1 { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(10%, 10%) scale(1.1); } }
@keyframes float2 { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(-10%, -10%) scale(1.15); } }

.page-content { padding-top: var(--navbar-h); position: relative; z-index: 1; }

/* SECTION HEADER */
.section-header { text-align: center; margin-bottom: 72px; position: relative; }
.section-tag { 
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 18px; 
  background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(10px);
  border: 1px solid rgba(79, 70, 229, 0.2); border-radius: 50px; 
  font-size: 12px; font-weight: 800; color: var(--primary); text-transform: uppercase; 
  letter-spacing: 0.15em; margin-bottom: 24px; box-shadow: var(--shadow-sm);
}
.section-title { 
  font-family: "Space Grotesk", sans-serif; font-size: 48px; font-weight: 900; 
  color: var(--text-primary); letter-spacing: -1.5px; line-height: 1.15; margin-bottom: 18px; 
}
.section-title .grad { background: var(--grad-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.section-subtitle { font-size: 18px; color: var(--text-secondary); max-width: 560px; margin: 0 auto; line-height: 1.7; font-weight: 500; }

/* ANIMATIONS — blur + translateY */
.animate-in { opacity: 0; transform: translateY(40px) scale(0.95); filter: blur(10px); transition: opacity 0.8s cubic-bezier(.16, 1, .3, 1), transform 0.8s cubic-bezier(.16, 1, .3, 1), filter 0.8s cubic-bezier(.16, 1, .3, 1); transition-delay: var(--delay, 0s); }
.animate-in.visible { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }

/* FOOTER */
.footer { 
  background: rgba(255, 255, 255, 0.6); backdrop-filter: blur(20px); border-top: 1px solid var(--border);
  color: var(--text-secondary); text-align: center; padding: 40px 24px; 
  font-size: 14px; font-weight: 600; letter-spacing: 0.02em; position: relative; z-index: 1;
}
.footer span { color: var(--coral); display: inline-block; animation: heartbeat 2s infinite; }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.2); } }

/* BOUTONS */
.btn { 
  height: 52px; padding: 0 32px; display: inline-flex; align-items: center; justify-content: center; 
  gap: 10px; border-radius: 50px; text-decoration: none; font-size: 15px; font-weight: 700; 
  font-family: "Inter", sans-serif; transition: all var(--transition-spring); cursor: pointer; 
  border: none; position: relative; overflow: hidden; 
}
.btn-icon { width: 18px; height: 18px; transition: transform var(--transition-spring); }
.btn:hover .btn-icon { transform: translateX(5px) scale(1.1); }
.btn-primary { color: #fff; background: var(--grad-main); background-size: 200% auto; box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35); }
.btn-primary:hover { background-position: right center; transform: translateY(-4px) scale(1.03); box-shadow: var(--shadow-glow); }
.btn-secondary { 
  color: var(--text-primary); background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(10px);
  border: 1.5px solid rgba(15, 23, 42, 0.1); box-shadow: var(--shadow-sm); 
}
.btn-secondary:hover { border-color: var(--primary-light); color: var(--primary); transform: translateY(-4px); box-shadow: var(--shadow-md); background: #fff; }

/* NEXT PAGE BUTTON FLOW */
.next-page-container {
  display: flex; justify-content: center; align-items: center;
  margin: 60px 0 20px; padding: 20px; width: 100%; position: relative; z-index: 10;
}
.btn-next-page {
  display: inline-flex; align-items: center; gap: 12px; padding: 16px 40px;
  background: var(--surface-2); color: var(--text-primary); text-decoration: none;
  font-size: 16px; font-weight: 700; border-radius: 50px;
  border: 1.5px solid var(--border); box-shadow: var(--shadow-sm);
  transition: all var(--transition-spring); backdrop-filter: blur(10px);
}
.btn-next-page:hover {
  background: var(--primary-soft); border-color: var(--primary); color: var(--primary);
  transform: translateY(-4px) scale(1.02); box-shadow: var(--shadow-md);
}
.btn-next-page i { transition: transform var(--transition-spring); }
.btn-next-page:hover i { transform: translateX(6px); }

@media(max-width:768px){
  .navbar { height: 64px; padding: 0 20px; }
  :root { --navbar-h: 64px; }
  .nav-links { 
    position: absolute; top: 64px; left: 0; right: 0; height: calc(100vh - 64px); background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(30px); 
    flex-direction: column; justify-content: center; gap: 12px; opacity: 0; visibility: hidden; 
    transition: all var(--transition-smooth); z-index: 99; overflow-y: auto;
  }
  .nav-links.mobile-open { opacity: 1; visibility: visible; }
  .nav-link { font-size: 20px; padding: 14px 32px; }
  .cv-button { display: none; }
  .menu-toggle { display: flex; }
  .section-title { font-size: 34px; letter-spacing: -1px; }
  .section-subtitle { font-size: 16px; }
}
