/* =========================================
   1. GLOBAL VARIABLES (:root)
========================================= */
:root {
  /* Gradients */
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --tertiary-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  --dark-gradient: linear-gradient(135deg, #0c0c0c 0%, #1a1a1a 100%);
  
  /* Neon Colors */
  --neon-blue: #00f5ff;
  --neon-purple: #bf00ff;
  --neon-pink: #ff006e;
  --neon-green: #39ff14;
  
  /* Backgrounds & Glassmorphism */
  --dark-bg: #0a0a0a;
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --text-glow: 0 0 20px rgba(255, 255, 255, 0.5);

  /* Fallback Accent Color (will be overridden by themes.css if used) */
  --accent-color: #00f2fe;
}

/* =========================================
   2. GLOBAL RESET & BASE STYLES
========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  cursor: none !important; /* Pour le curseur personnalisé */
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--dark-bg);
  color: #ffffff;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* Effet de lumière de fond globale */
body::before {
  content: "";
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, #007BFF 0%, transparent 60%);
  animation: moveLight 10s linear infinite;
  opacity: 0.15;
  z-index: 0;
}

header, nav, main, footer, section {
  position: relative;
  z-index: 1;
}

.text-white { color: #fff !important; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.1); }
::-webkit-scrollbar-thumb { background: var(--tertiary-gradient); border-radius: 10px; }

/* =========================================
   3. CUSTOM CURSOR
========================================= */
.custom-cursor {
  position: fixed;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: rgba(200, 200, 200, 0.4);
  backdrop-filter: blur(3px);
  box-shadow: 0 0 6px rgba(200, 200, 200, 0.5);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  transition: transform 0.1s ease, background-color 0.2s;
}

.custom-cursor.active {
  background-color: rgba(160, 160, 160, 0.7);
  transform: scale(1.4) translate(-50%, -50%);
}

/* =========================================
   4. EXTRAORDINARY NAVBAR
========================================= */
.navbar-glass {
  background: rgba(10, 10, 10, 0.65) !important;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  transition: all 0.4s ease;
}

.brand-text {
  font-weight: 800;
  background: linear-gradient(90deg, #ffffff, var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
}

.logo-pulse {
  animation: pulse-glow 3s infinite alternate;
}

.navbar-nav .nav-item { margin: 0 8px; }

.navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.7) !important;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 10px 10px !important;
  transition: all 0.3s ease;
}

.navbar-nav .nav-link span {
  position: relative;
  display: inline-block;
}

.navbar-nav .nav-link span::after {
  content: '';
  position: absolute;
  bottom: -6px; 
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 0 10px var(--accent-color);
  border-radius: 2px;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: #ffffff !important;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.navbar-nav .nav-link:hover span::after,
.navbar-nav .nav-link.active span::after {
  width: 100%;
}

/* =========================================
   5. HOME & ABOUT PAGES STYLES
========================================= */
.text-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.header h1, .header p { text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5); }
#typing-text { color: #ffffff; }
.text-welcome { color: #547489; }

.btn-about {
  background-color: #1ba7d5;
  border: none;
  padding: 12px 24px;
  font-size: 1.2rem;
  border-radius: 6px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #fff;
  animation: pulse 2s infinite;
}

.btn-about:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(0, 191, 255, 0.6);
}

.btn-outline-light { border-color: #deecf5; color: #deecf5; }
.btn-outline-light:hover { background-color: #396583; color: #fff; }

.social { bottom: 30px; }
.social a i {
  color: #fff;
  transition: color 0.3s, transform 0.3s, text-shadow 0.3s;
}
.social a:hover i {
  color: #3498db;
  text-shadow: 0 0 8px #3498db, 0 0 16px #3498db;
  transform: scale(1.1);
}

.about-modern-section { padding: 5rem 0; }
.section-title { text-transform: uppercase; font-weight: bold; color: #00bfff; letter-spacing: 1px; }
.section-line { width: 60px; height: 4px; background-color: #00bfff; margin: 0 auto; border: none; border-radius: 2px; }
.section-subtitle { font-size: 1.8rem; margin-top: 15px; color: #ccc; }

.about-img {
  width: 100%; max-width: 300px; height: auto;
  border-radius: 50% / 30%;
  object-fit: cover;
  transition: transform 0.4s ease-in-out, box-shadow 0.3s ease-in-out;
  box-shadow: 0 0 20px rgba(0, 123, 255, 0.5) !important;
  filter: brightness(1.05);
}
.about-img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px 10px rgba(0, 123, 255, 0.7), 0 0 60px 20px rgba(0, 123, 255, 0.4);
}

.about-text {
  background-color: var(--glass-bg);
  backdrop-filter: blur(6px);
  border-radius: 1rem;
  border: 1px solid var(--glass-border);
  padding: 2rem;
  color: #f0f0f0;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); 
}

/* =========================================
   6. SKILLS PAGE STYLES
========================================= */
.skills-hero { padding: 120px 0 80px; text-align: center; position: relative; }

.hero-title {
  font-size: 4rem; font-weight: 900;
  background: var(--tertiary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
  animation: titleGlow 3s ease-in-out infinite alternate;
}

.hero-subtitle {
  font-size: 1.5rem; opacity: 0.8; margin-bottom: 3rem;
  animation: fadeInUp 1s ease 0.5s both;
}

.skills-container { padding: 80px 0; }

.skill-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2.5rem;
  height: 100%;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
}

.skill-card:hover {
  transform: translateY(-10px) rotateX(5deg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 80px rgba(79, 172, 254, 0.3);
  border-color: var(--neon-blue);
}

.skill-icon {
  font-size: 3rem; margin-bottom: 1.5rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all 0.3s ease;
}

.skill-card:hover .skill-icon {
  transform: scale(1.2) rotateY(180deg);
  filter: drop-shadow(0 0 20px rgba(79, 172, 254, 0.8));
}

.skill-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 1rem; transition: all 0.3s ease; }
.skill-card:hover .skill-title { color: var(--neon-blue); text-shadow: 0 0 10px var(--neon-blue); }
.skill-description { opacity: 0.8; line-height: 1.6; transition: all 0.3s ease; }

.progress-label { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font-size: 0.9rem; font-weight: 600; }
.progress-bar-custom { height: 8px; background: rgba(255, 255, 255, 0.1); border-radius: 10px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--tertiary-gradient); border-radius: 10px; position: relative; transition: width 2s ease; }

/* Floating action elements (Skills) */
.floating-stats { position: fixed; top: 50%; right: 30px; transform: translateY(-50%); z-index: 100; }
.stat-item {
  background: var(--glass-bg); backdrop-filter: blur(20px); border: 1px solid var(--glass-border);
  border-radius: 15px; padding: 1rem; margin-bottom: 1rem; text-align: center; transition: all 0.3s ease;
}
.stat-item:hover { transform: scale(1.1); box-shadow: 0 10px 30px rgba(79, 172, 254, 0.3); }
.stat-number { font-size: 2rem; font-weight: 900; background: var(--tertiary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* =========================================
   7. CONTACT PAGE STYLES
========================================= */
.contact-hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
}

.glitch-title {
  font-size: 4rem; font-weight: bold; text-transform: uppercase; letter-spacing: 3px;
  margin-bottom: 2rem; position: relative; color: #fff; text-shadow: 0 0 20px var(--neon-blue);
}
.glitch-title::before, .glitch-title::after {
  content: attr(data-text); position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}
.glitch-title::before { animation: glitch-1 2s infinite; color: var(--neon-pink); z-index: -1; }
.glitch-title::after { animation: glitch-2 2s infinite; color: var(--neon-blue); z-index: -2; }

.spectacular-phrase {
  font-size: 1.8rem; font-weight: 600; text-align: center;
  background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  opacity: 0; animation: fadeInUp 1s ease-out 0.5s forwards;
}

.contact-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 2rem; margin-top: 4rem; padding: 0 2rem;
}

.contact-card {
  background: var(--glass-bg); backdrop-filter: blur(10px); border-radius: 20px; padding: 2.5rem;
  border: 1px solid var(--glass-border); transition: all 0.3s ease; position: relative; overflow: hidden;
}
.contact-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0, 255, 255, 0.3); }
.contact-icon { font-size: 3rem; margin-bottom: 1.5rem; background: var(--secondary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.contact-title { font-size: 1.5rem; font-weight: bold; margin-bottom: 1rem; }
.contact-info { font-size: 1.2rem; color: var(--neon-blue); font-weight: 600; text-shadow: 0 0 10px rgba(0, 255, 255, 0.5); }

.form-control {
  border-radius: 10px; border: 1px solid #555; padding: 10px; font-size: 1rem;
  background-color: #1a1a1a; color: #fff;
}
.form-control::placeholder { color: #bbb; }
.success-message { color: #28a745; margin-top: 1rem; display: none; font-weight: bold; }

/* =========================================
   8. DOWNLOAD PAGE STYLES
========================================= */
.cv-preview-card {
  background: var(--glass-bg); backdrop-filter: blur(20px); border: 1px solid var(--glass-border);
  border-radius: 30px; padding: 3rem; position: relative; overflow: hidden; transition: all 0.4s ease;
}
.cv-icon-container { width: 120px; height: 120px; margin: 0 auto 2rem; position: relative; display: flex; align-items: center; justify-content: center; }
.cv-icon-bg { position: absolute; width: 100%; height: 100%; background: var(--primary-gradient); border-radius: 50%; animation: iconRotate 10s linear infinite; opacity: 0.2; }
.cv-icon { font-size: 4rem; color: var(--neon-blue); z-index: 2; animation: iconFloat 3s ease-in-out infinite alternate; filter: drop-shadow(0 0 20px var(--neon-blue)); }

.btn-modern {
  padding: 1rem 2.5rem; border: none; border-radius: 15px; font-size: 1.1rem; font-weight: 600;
  text-decoration: none; position: relative; overflow: hidden; transition: all 0.3s ease;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}
.btn-preview { background: var(--primary-gradient); color: white; box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3); }
.btn-download { background: var(--success-gradient); color: white; box-shadow: 0 10px 30px rgba(17, 153, 142, 0.3); }
.btn-modern:hover { transform: translateY(-5px) scale(1.05); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3); color: white;}

/* =========================================
   9. GLOBAL KEYFRAMES & ANIMATIONS
========================================= */
@keyframes moveLight { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(25%, 25%); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@keyframes pulse-glow { 0% { filter: drop-shadow(0 0 5px rgba(0, 123, 255, 0.5)); transform: scale(1); } 100% { filter: drop-shadow(0 0 15px rgba(0, 123, 255, 0.8)); transform: scale(1.05); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes titleGlow { 0% { filter: drop-shadow(0 0 20px rgba(79, 172, 254, 0.5)); } 100% { filter: drop-shadow(0 0 40px rgba(79, 172, 254, 0.8)); } }
@keyframes glitch-1 { 0%, 14%, 15%, 49%, 50%, 99%, 100% { transform: translate(0); } 15%, 49% { transform: translate(-2px, 2px); } }
@keyframes glitch-2 { 0%, 20%, 21%, 62%, 63%, 99%, 100% { transform: translate(0); } 21%, 62% { transform: translate(2px, -2px); } }
@keyframes iconRotate { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes iconFloat { 0% { transform: translateY(0px); } 100% { transform: translateY(-10px); } }

/* =========================================
   10. MEDIA QUERIES (RESPONSIVE)
========================================= */
@media (max-width: 768px) {
  .header .social i { font-size: 30px; }
  .header .roles { font-size: 18px !important; }
  .about-content { flex-direction: column; }
  .hero-title, .glitch-title { font-size: 2.5rem; }
  .spectacular-phrase { font-size: 1.4rem; }
  .floating-stats { display: none; }
  .contact-cards { grid-template-columns: 1fr; }
  .action-buttons { flex-direction: column; align-items: center; }
  .btn-modern { width: 100%; max-width: 300px; }
}