/* ------------------ RESET DE BASE ------------------ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  scroll-behavior: smooth;
  font-family: 'Poppins', sans-serif;
}

body {
  background-color: #FAF3E0;
  color: #2F2F4F;
  position: relative;
  z-index: 0;
  overflow-x: hidden;
}


/* ------------------ Loader ------------------ */
#loader {
  position: fixed;
  z-index: 9999;
  background: #FAF3E0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 1.5s ease;
}

#loader img {
  width: 450px;
  height: auto;
  opacity: 0;
  transform: scale(0.8);
  animation: zoomFade 2s ease forwards;
}

@keyframes zoomFade {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

#loader.fade-out {
  opacity: 0;
  visibility: hidden;
}



/* ------------------ HEADER & NAVIGATION ------------------ */
header {
  width: 100%;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(47, 47, 79, 0.1);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  position: relative;
}

.logo img {
  height: 150px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: #2F2F4F;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: #C3B1E1;
}

.burger {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  list-style: none;
  padding: 0.5rem 0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu li a {
  display: block;
  padding: 0.5rem 1rem;
  white-space: nowrap;
}


/* ------------------ BOUTONS ------------------ */
.btn {
   display: inline-block;
  background-color: #C3B1E1;
  color: #2F2F4F;
  padding: 0.8rem 1.5rem;
  font-weight: 600;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  border: none;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: #b59ed9;
}

.btn-group {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}


/* ------------------ MAIN & SECTIONS ------------------ */
main {
  padding: 3rem 1rem;
  /* background-color: #f4f4f4; */
  color: #1d1d1d;
  /* font-family: 'Segoe UI', sans-serif; */
}

section {
  max-width: 900px;
  margin: 3rem auto;
  padding: 2rem;
  background-color: #fdf8f1;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

section:hover {
  transform: translateY(-2px);
}

section h2 {
  font-size: 2rem;
  color: #C3B1E1;
  margin-bottom: 1rem;
  /* position: relative; */
}

section h2::before {
  content: "⭐";
  margin-right: 0.5rem;
  /* color: #C3B1E1; */
}

section p {
  line-height: 1.7;
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
  color: #2F2F4F;
}

.projet_page h2::before {
  content: "🗄️";
  margin-right: 0.5rem;
}

.projet_web h2::before {
  content: "🌐";
  margin-right: 0.5rem;
}

.projet_jeu h2::before {
  content: "🎮";
  margin-right: 0.5rem;
}

.projet_design h2::before {
  content: "🖼️";
  margin-right: 0.5rem;
}

/* ------------------ PROJET DESIGN ------------------ */
.projet_design {
  padding: 40px 20px;
  background-color: #fdf8f1;
  text-align: center;
}

.projet_design p {
  max-width: 800px;
  margin: 0 auto 30px;
  font-size: 1.1rem;
  line-height: 1.6;
}

.design_cards {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}


/* ------------------ CARDS (commun design + jeu) ------------------ */
.card {
  width: 260px;
  height: 340px;
  perspective: 1000px;
  cursor: pointer;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.card:hover .card-inner,
.card.flipped .card-inner {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-front {
  background-color: #F4C2C2;
  font-size: 1.2rem;
  font-weight: bold;
}

.card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-back {
  background-color: #F4C2C2;
  color: #2F2F4F;
  transform: rotateY(180deg);
  padding: 20px;
  flex-direction: column;
}

.card-back video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-back h3 {
  margin-bottom: 10px;
}


/* ------------------ PROJET JEU ------------------ */
.projet_jeu {
  padding: 60px 20px;
  background-color: #fdf8f1;
  text-align: center;
}

.projet_jeu p {
  max-width: 800px;
  margin: 0 auto 30px;
  font-size: 1.1rem;
  color: #333;
  line-height: 1.6;
}

.skills-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 40px;
}

.skills-grid span {
  background-color: #C3B1E1;
  color: #fdf8f1;
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 0.95rem;
}

.game_cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
  margin-bottom: 40px;
}

.conclusion {
  font-size: 1rem;
  margin-top: 20px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}


/* ------------------ A PROPOS ------------------ */
.aboutme {
  margin-top: 20px;
}

.aboutme button.btn {
  background-color: #C3B1E1;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s;
}

.aboutme button.btn:hover {
  background-color: #b59ed9;
}


/* ------------------ CONTACT ------------------ */
.contact-section {
  max-width: 700px;
  margin: 3rem auto;
  padding: 2.5rem;
  background-color: #fdf8f1;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.contact-section h2 {
  font-size: 2rem;
  color: #C3B1E1;
  margin-bottom: 1rem;
}

.contact-section h2::before {
  content: "📧";
  margin-right: 0.5rem;
  /* color: #1a73e8; */
}

.contact-section p {
  font-size: 1.1rem;
  color: #444;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 500px;
  margin: 2rem auto;
}

.contact-form input,
.contact-form textarea {
  padding: 0.8rem;
  border: 1px solid #C3B1E1;
  background-color: #fff;
  color: #2F2F4F;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
}

.contact-form button {
  background-color: #C3B1E1;
  color: white;
  border: none;
  padding: 0.8rem 1.6rem;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.contact-form button:hover {
  background-color: #b59ed9;
}

.textarea-wrapper {
  position: relative;
  width: 100%;
}

#message {
  width: 100%;
  resize: none;
  padding-bottom: 2rem; /* espace pour ne pas cacher le texte */
  box-sizing: border-box;
}

#char-counter {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 0.8rem;
  color: grey;
  pointer-events: none; /* évite les clics accidentels */
}

#char-counter.limit-reached {
  color: red;
}


/* ------------------ SOCIAL LINKS ------------------ */
.social-links {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
}

.social-links a {
  color: #C3B1E1;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s;
}

.social-links a:hover {
  color: #b59ed9;
}


/* ------------------ FOOTER ------------------ */
.site-footer {
  background-color: #f4f0f8;
  color: #4a4a4a;
  padding: 2rem 1rem;
  font-size: 0.95rem;
  margin-top: 3rem;
  border-top: 1px solid #C3B1E1;
}

.footer-content {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-align: center;
}

.footer-logo {
  border-radius: 8px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.footer-links a {
  text-decoration: none;
  color: #C3B1E1;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: #b59ed9;
}


/* ------------------ CARROUSEL ------------------ */
.carousel {
  position: relative;
  width: 100%;
  max-width: 700px;
  height: 400px;
  margin: 2rem auto;
  overflow: hidden;
  border-radius: 10px;
  background-color: #f0f0f0;
}

.carousel-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  z-index: 0;
}

.carousel-image.active {
  opacity: 1;
  z-index: 1;
}


/* ------------------ RESPONSIVE ------------------ */
@media (max-width: 768px) {
  .burger {
    display: block;
    z-index: 1001;
    position: relative;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    background: #fff;
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    text-align: center;
    gap: 1rem;
    padding: 1rem 0;
    z-index: 1000;
  }

  .nav-links.active {
    display: flex;
  }

  .dropdown-menu {
    position: static;
    box-shadow: none;
  }

  .dropdown:hover .dropdown-menu {
    display: none;
  }

  .dropdown>a::after {
    content: " ▼";
  }

  .dropdown.open .dropdown-menu {
    display: block;
  }
}

@media (min-width: 600px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .footer-left {
    text-align: left;
  }
}