:root {
  /* Couleurs principales (Light mode) */
  --clr-bg: #f9f8f7;
  --clr-text: #1a1513;
  --clr-neutral: #a38a80;
  --clr-accent: #a7c7b5;
  --clr-accent2: #7fa4ac;

  /* Couleurs structurelles */
  --clr-card-bg: #ffffff;
  --clr-border: #ddd;
  --clr-shadow: rgba(0, 0, 0, 0.1);
  --clr-navbar-bg: rgba(255, 255, 255, 0.9);
  --clr-footer-bg: #ffffff;
}

.darkmode {
  /* Couleurs principales (Dark mode) */
  --clr-bg: #0e0e0e;
  --clr-text: #e6e6fa;
  --clr-neutral: #cfcfcf;
  --clr-accent: #ef1818;
  --clr-accent2: #fae019;

  /* Couleurs structurelles */
  --clr-card-bg: #1b1b1b;
  --clr-border: #333;
  --clr-shadow: rgba(255, 255, 255, 0.1);
  --clr-navbar-bg: rgba(20, 20, 20, 0.9);
  --clr-footer-bg: #1b1b1b;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-body);
}

body {
  background-color: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.6;
  scroll-behavior: smooth;
}
html{
  scroll-behavior: smooth;
}
/*the terminale 78*/
#terminal-page {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-image:url(image/Loop\ Glitch\ GIF\ by\ Death\ Orgone.gif);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  color: #fffb00;
  font-family: "Courier New", monospace;
}
.terminal {
  text-align: center;
}
#terminal-input {
  margin-top: 20px;
  padding: 10px;
  width: 200px;
  background: #000;
  color: #eeff00;
  border: 1px solid #ddff00;
  font-family: "Courier New", monospace;
  outline: none;
}
/* --- NAVBAR --- */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  position: fixed;
  width: 100%;
  top: 0;
  background: var(--clr-navbar-bg);
  box-shadow: 0 2px 5px var(--clr-shadow);
  backdrop-filter: blur(10px);
  z-index: 1000;
}
.nav-links ul {
  list-style: none;
  display: flex;
  gap: 25px;
  align-items: center;
}

.nav-links ul li button#theme-switch {
  background: var(--clr-accent2);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  padding: 0;
}

.nav-links ul li button#theme-switch svg:last-child {
  display: none;
}

.darkmode .nav-links ul li button#theme-switch svg:first-child {
  display: none;
}

.darkmode .nav-links ul li button#theme-switch svg:last-child {
  display: block;
}

/* Pour le responsive */
@media (max-width: 768px) {
  .nav-links ul {
    flex-direction: column;
    gap: 15px;
  }

  .nav-links ul li button#theme-switch {
    margin-top: 10px;
  }
}

.logo {
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--clr-text);
  text-decoration: none;
}

.nav-links ul {
  list-style: none;
  display: flex;
  gap: 30px;
}

.nav-links a {
  color: var(--clr-text);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color 0.3s;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--clr-accent2);
  transition: width 0.3s;
}

.nav-links a:hover {
  color: var(--clr-accent2);
}

.nav-links a:hover::after {
  width: 100%;
}

/* --- MENU MOBILE --- */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--clr-text);
  transition: 0.3s;
  border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translateY(8px);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-8px);
}

/* --- HOME --- */
.home {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 20px 60px;
  background: #ffffff00;
  animation: fadeIn 1s ease forwards;
}

.home-content {
  max-width: 700px;
}

.home h1 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: var(--clr-text);
}

.home h2 {
  font-weight: 400;
  color: var(--clr-neutral);
  margin-bottom: 20px;
}

.home p {
  color: var(--clr-neutral);
}

.info {
  margin: 25px 0;
  font-size: 0.95rem;
  color: var(--clr-neutral);
}

.info a {
  color: var(--clr-accent2);
  text-decoration: none;
}

/* --- BUTTONS --- */
.btn, .btn-outline {
  display: inline-block;
  padding: 10px 25px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s;
  margin: 5px;
}

.btn {
  background: var(--clr-accent2);
  color: var(--clr-bg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-outline {
  border: 2px solid var(--clr-accent2);
  color: var(--clr-accent2);
}

.btn-outline:hover {
  background: var(--clr-accent2);
  color: var(--clr-bg);
}

/* --- SECTIONS --- */
.section {
  padding: 100px 20px;
  text-align: center;
  animation: fadeInUp 1s ease;
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 40px;
  color: var(--clr-text);
  position: relative;
  display: inline-block;
}

.section h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--clr-accent2);
  border-radius: 10px;
}

/* --- SKILLS --- */
.skills-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.skill {
  background: hsl(0, 0%, 100%);
  border: 1px solid #ffffff;
  padding: 10px 20px;
  border-radius: 20px;
  font-weight: 500;
  color: black;
  transition: all 0.3s;
}

.skill:hover {
  transform: scale(1.1);
  background: var(--clr-accent2);
  color: var(--clr-bg);
}

/* --- PROJECTS --- */
.projects {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
}

.project-card {
  background: var(--clr-card-bg);
  border: 1px solid var(--clr-border);
  box-shadow: 0 2px 10px var(--clr-shadow);
  border-radius: 20px;
  padding: 25px;
  max-width: 300px;
  transition: all 0.4s ease;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.project-card h3 {
  color: var(--clr-accent2);
  margin-bottom: 10px;
}

/* --- EXPERIENCE --- */
.experience {
  width: 100%;
  max-width: 350px;
  margin: 0 auto;
  padding: 100px 20px;
  position: relative;
  overflow-x: auto;
  display: flex;
  gap: 25px;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  text-align: center;
}

.experience h2 {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  font-weight: 600;
  color: var(--clr-text);
  text-transform: uppercase;
  letter-spacing: 2px;
  background: var(--clr-bg);
  padding: 0 10px;
  z-index: 10;
}

.card {
  scroll-snap-align: center;
  flex-shrink: 0;
  width: 280px;
  height: 400px;
  background: #ffffff61;
  border-radius: 20px;
  box-shadow: 0 2px 10px rgba(251, 255, 0, 0.05);
  border: 1px solid #ffffff23;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--clr-text);
  font-weight: 500;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.card h3 {
  font-size: 1.4rem;
  color: var(--clr-accent2);
  margin-bottom: 10px;
}

.card p {
  font-size: 0.9rem;
  color: var(--clr-neutral);
  padding: 0 15px;
}

/* --- CONTACT --- */
.contact p {
  max-width: 500px;
  margin: 0 auto 20px;
  color: var(--clr-neutral);
}

/* --- SOCIAL LINKS --- */
.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 30px 0;
}

.social-links a {
  display: inline-block;
  width: 40px;
  height: 40px;
  background-color: var(--clr-accent2);
  border-radius: 50%;
  
}

.social-links img {
  width: 100%;
  height: 100%;
  filter: grayscale(100%);
  transition: all 0.3s;
}

.social-links img:hover {
  filter: grayscale(0%);
  transform: scale(1.1);
}

/* --- FOOTER --- */
footer {
  text-align: center;
  padding: 40px 20px;
  font-size: 0.9rem;
  background: var(--clr-footer-bg);
  border-top: 1px solid var(--clr-border);
  color: var(--clr-neutral);
}

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

  .nav-links.open {
    display: block;
    position: absolute;
    top: 60px;
    right: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  }

  .nav-links ul {
    flex-direction: column;
    align-items: flex-start;
    padding: 15px;
  }

  .nav-links li {
    margin: 10px 0;
  }

  .menu-toggle {
    display: flex;
  }

  .home h1 {
    font-size: 2rem;
  }
}

/* --- ANIMATIONS --- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}