:root {
  --bg: #f5f7fa;
  --text: #222;
  --accent: #0077ff;
  --card: #ffffff;
  --border: #ddd;
}


/* Ajustements en mode sombre */
body.dark {
  --bg: #121212;
  --text: #eee;
  --accent: #66ccff;
  --card: #1e1e1e;
  --border: #333;
}

body.dark #theme-toggle img {
  filter: invert(1) brightness(2);
}

body.dark .hero {
  background-color: #1a1a1a;
}

body.dark footer {
  color: #999;
}

body.dark footer .social-icons i {
  color: #eee;
}


* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px;
}


/* Header */
header {
  background-color: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding-right: 60px;
}

header h1 {
  margin-right: auto;
}

nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

nav a {
  color: var(--text);
  font-weight: 500;
  transition: color 0.2s;
}

nav a:hover {
  color: var(--accent);
}

#theme-toggle {
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  z-index: 1001;
}

#theme-toggle img {
  cursor: pointer;
  transition: transform 0.2s ease;
}

#theme-toggle img:hover {
  transform: scale(1.2);
}


/* Hero Section */
.hero {
  padding: 80px 20px;
  text-align: center;
  background-color: #eaf0f6;
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.hero p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto;
}


/* Sections */
section {
  padding: 75px 20px;
}

h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: var(--accent);
  text-align: center;
}

section p {
  max-width: 800px;
  margin: 0 auto 1em auto;
}


/* Projets */
#projects {
  text-align: center;
}

#projects a {
  display: inline-block;
}


/* Footer */
footer {
  text-align: center;
  padding: 20px;
  color: #777;
}

footer .social-icons {
  margin-top: 10px;
}

footer .social-icons i {
  font-size: 35px;
  padding: 1%;
  color: var(--text);
  transition: transform 0.2s ease, color 0.2s ease;
  cursor: pointer;
}

footer .social-icons i:hover {
  transform: scale(1.2);
}


/* Responsive */
@media (max-width: 960px) {
  .container {
    padding: 15px;
  }
}

@media (max-width: 768px) {
  header .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    padding-right: 15px;
    padding-bottom: 15px;
  }

  header h1 {
    margin-right: 0;
  }

  nav {
    width: 100%;
    justify-content: center;
    gap: 15px;
  }

  .hero {
    padding: 60px 15px;
  }

  .hero h2 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

  section {
    padding: 50px 15px;
  }

  h3 {
    font-size: 1.6rem;
  }

  #theme-toggle {
    top: 15px;
    right: 15px;
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 10px;
  }

  nav {
    gap: 10px;
  }

  .hero h2 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 1rem;
  }

  section {
    padding: 40px 10px;
  }

  h3 {
    font-size: 1.4rem;
  }

  #theme-toggle {
    top: 10px;
    right: 10px;
  }

  #projects a {
    width: 100%;
    max-width: 300px;
  }
}