/* --- STYLES GLOBAUX --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

:root {
  --bg-color: #0b0f1a;
  --text-color: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.05);
  --accent: #6c63ff;
  --header-bg: rgba(11, 15, 26, 0.95);
  /* Couleurs pour le ciel nocturne */
  --sky-top: #05070a;
  --sky-bottom: #111827;
}

body.light-theme {
  --bg-color: #f4f7fb;
  --text-color: #1a1a1a;
  --card-bg: #ffffff;
  --accent: #3b82f6;
  --header-bg: rgba(244, 247, 251, 0.95);
  /* Couleurs pour le ciel clair */
  --sky-top: #87ceeb;
  --sky-bottom: #e0f2fe;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background 0.4s ease, color 0.4s ease;
}

/* --- EFFETS D'ARRIÈRE-PLAN --- */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(to bottom, var(--sky-top), var(--sky-bottom));
  transition: background 0.5s ease;
}

/* Effet étoiles uniquement pour le mode sombre */
body:not(.light-theme)::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.4;
  background-image: 
    radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 40px),
    radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 30px),
    radial-gradient(white, rgba(255,255,255,.1) 2px, transparent 20px);
  background-size: 550px 550px, 350px 350px, 250px 250px;
  background-position: 0 0, 40px 60px, 130px 270px;
}

/* --- THEME TOGGLE --- */
.theme-toggle {
  position: fixed; top: 25px; right: 25px; width: 50px; height: 50px;
  border-radius: 50%; border: none; cursor: pointer; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  background: var(--card-bg); color: var(--text-color);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2); transition: transform 0.3s;
}
.theme-toggle svg { width: 26px; height: 26px; }
.sun-icon { display: none; color: #f59e0b; }
.moon-icon { display: block; color: #f1f5f9; }
body.light-theme .sun-icon { display: block; }
body.light-theme .moon-icon { display: none; }

/* --- NAVIGATION --- */
.header { position: sticky; top: 0; z-index: 1000; background: var(--header-bg); backdrop-filter: blur(8px); padding: 1rem 0; }
.nav { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 0 2rem; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--accent); }
.nav-links { display: flex; list-style: none; gap: 1.5rem; }
.nav-links a { text-decoration: none; color: var(--text-color); font-weight: 500; opacity: 0.8; }
.nav-links a:hover { opacity: 1; color: var(--accent); }

/* --- SECTION COMPÉTENCES & ICÔNES --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.skill-box {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.skill-box h3 {
  margin-bottom: 1rem;
  color: var(--accent);
}

/* Alignement des icônes à côté du texte */
.skill-box p {
  display: flex;
  flex-wrap: wrap;
  align-items: center; /* Aligne verticalement l'image et le texte */
  gap: 8px; /* Espace entre le texte et l'image */
  line-height: 2;
}

.skill-box img {
  width: 20px; /* Taille de l'icône */
  height: auto;
  object-fit: contain;
  vertical-align: middle;
}

/* --- AUTRES SECTIONS --- */
.hero-section { height: 60vh; display: flex; align-items: center; justify-content: center; text-align: center; }
.highlight { color: var(--accent); }
.section { max-width: 1100px; margin: 4rem auto; padding: 0 2rem; }
.section-alt { background: var(--card-bg); padding: 3rem 2rem; border-radius: 20px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.card { background: var(--card-bg); padding: 2rem; border-radius: 15px; border: 1px solid rgba(255,255,255,0.05); }
.btn { padding: 0.8rem 2rem; background: var(--accent); color: white; border: none; border-radius: 8px; cursor: pointer; text-decoration: none; display: inline-block; font-weight: 600; }
.btn {
  padding: 10px 20px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  text-decoration: none;
  transition: 0.3s;
}

.btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

@media (max-width: 768px) {
  .nav-links { display: none; }
}