@import url("https://fonts.googleapis.com/css2?family=Comfortaa:wght@300..700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Comfortaa", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}
body {
  line-height: 1.6;
  background: linear-gradient(#012459, rgb(110, 2, 125));
  background-size: cover;
  color: #f7f3f3;
  scroll-behavior: smooth;
  padding-top: 80px;
}
header {
  background: #02001f;
  background: linear-gradient(
    90deg,
    rgba(2, 0, 31, 1) 0%,
    rgba(38, 0, 76, 1) 100%
  );
  color: #fff;
  padding: 20px 0;
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  transition: top 0.3s;
}
header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 90%;
  margin: 0 auto;
}
header nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}
.menu-toggle span {
  width: 25px;
  height: 3px;
  background: #fff;
  border-radius: 3px;
}

@media (max-width: 1200px) {
  .project-card {
    padding: 25px;
  }
}

@media (max-width: 992px) {
  .project-card {
    padding: 20px;
  }
}

@media (max-width: 768px) {
  header nav ul {
    display: none;
    flex-direction: column;
    background: #011b41;
    position: absolute;
    top: 60px;
    right: 20px;
    width: 200px;
    padding: 10px;
    border-radius: 10px;
  }
  header nav ul.active {
    display: flex;
  }
  .menu-toggle {
    display: flex;
  }
  
  .project-card {
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px;
    gap: 15px;
  }
  
  .project-card img {
    width: 100%;
    height: auto;
    max-width: 300px;
    object-fit: contain;
  }
  
  .project-card button,
  .project-card a.btn {
    width: 100%;
  }
}

@media (max-width: 375px) {
  .project-card {
    height: auto;
    padding: 30px;
    gap: 18px;
    margin-bottom: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .project-card img {
    max-width: 250px;
  }
  
  .btn {
    padding: 14px 16px;
    margin: 10px 0;
    font-size: 0.9rem;
  }
}
header nav ul li a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s;
}
header nav ul li a:hover {
  color: #e254f4;
}
.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-header {
  height: 80px;
  width: auto;
  object-fit: contain;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.logo-header:hover {
  transform: scale(1.05);
}

section {
  padding: 60px 20px;
  width: 100%;
  margin: 0 auto;
}
h2 {
  margin-bottom: 20px;
  text-align: center;
}
.projects-container {
  display: block;
  width: 100%;
}
.project-card {
  margin-bottom: 20px;
  width: 100%;
  height: auto;
  background: linear-gradient(to top, #012459, rgb(109, 2, 123));
  padding: 15px;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.25);
  text-align: center;
  transition:
    transform 0.3s,
    opacity 0.6s;
  opacity: 0;
  transform: translateY(50px);
}
.project-card:hover {
  transform: scale(1.05);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}
.image-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    to top,
    rgba(1, 36, 89, 0.95),
    rgba(73, 2, 82, 0.95)
  );
  z-index: 2000;
  pointer-events: none; /* bloqué tant que pas .show */
  opacity: 0;
  transition:
    opacity 300ms ease,
    transform 300ms ease;
  transform: scale(0.98);
  flex-direction: column;
}
.image-overlay.show {
  pointer-events: auto;
  opacity: 1;
  transform: scale(1);
}
.image-overlay .close-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
  font-weight: bold;
  user-select: none;
}
.popup-img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  transform: translateY(10px) scale(0.98);
  opacity: 0;
  transition:
    transform 300ms ease,
    opacity 300ms ease;
}
.image-overlay.show .popup-img {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.image-overlay img {
  cursor: default;
}
.project-card img {
  width: 300px;
  height: 264px;
  object-fit: cover;
  border-radius: 10px;
  filter: grayscale(100%);
  transition: filter 300ms ease;
}
.project-card img.active {
  filter: none;
}

form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 500px;
  margin: 0 auto;
}
input,
textarea {
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
}
button {
  padding: 10px;
  border: none;
  border-radius: 5px;
  background: #01132e;
  color: #fff;
  cursor: pointer;
  transition: background 0.3s;
}
button:hover {
  background: #e254f4;
}

footer {
  text-align: center;
  padding: 20px;
  background: #011b41;
  color: #fff;
}
p {
  line-height: 1.7;
  margin-bottom: 15px;
  color: #f7f3f3;
  font-size: 1.1rem;
}
p strong {
  color: #e254f4;
}
a {
  color: #544ae7;
  text-decoration: none;
}

/* Section compétences */
#skills {
  padding: 60px 20px;
  width: 90%;
  margin: 0 auto;
  text-align: center;
}

.skills-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 600px;
  margin: 0 auto;
}

.skill {
  text-align: left;
}

.skill span {
  font-weight: bold;
  display: block;
  margin-bottom: 8px;
}

.progress-bar {
  width: 100%;
  height: 20px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
  transition: ease 0.5s;
}
.progress-bar:hover {
  transform: scale(1.05);
  border-color: rgba(255, 255, 255, 0.4);
  transition: ease 0.5s;
}
.progress {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #5a82e7, #e254f4);
  border-radius: 10px;
  transition: width 2s ease;
}

.contact-links {
  margin-bottom: 20px;
  text-align: center;
}

/* Styles de boutons pour les liens */
.btn {
  display: inline-block;
  padding: 12px 24px;
  margin: 8px 4px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
}

/* Bouton primaire - Violet/Rose */
.btn-primary {
  background: linear-gradient(135deg, #544ae7 0%, #e254f4 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(226, 84, 244, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(226, 84, 244, 0.5);
}

/* Bouton secondaire - Outline */
.btn-secondary {
  background: transparent;
  color: #e254f4;
  border: 2px solid #e254f4;
}

.btn-secondary:hover {
  background: rgba(226, 84, 244, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(226, 84, 244, 0.3);
}

/* Bouton succès - Vert */
.btn-success {
  background: linear-gradient(135deg, #00d084 0%, #00b87e 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 208, 132, 0.3);
}

.btn-success:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 208, 132, 0.5);
}

/* Bouton info - Bleu */
.btn-info {
  background: linear-gradient(135deg, #5a82e7 0%, #3d5fd0 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(90, 130, 231, 0.3);
}

.btn-info:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(90, 130, 231, 0.5);
}

/* Bouton danger - Rouge */
.btn-danger {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-danger:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.5);
}

/* Bouton tailles différentes */
.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.1rem;
}

/* Bouton bloc (largeur 100%) */
.btn-block {
  display: block;
  width: 100%;
}

/* Bouton avec icône */
.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* État désactivé */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

/* Variante pour liens GitHub */
.btn-github {
  background: linear-gradient(135deg, #333 0%, #1a1a1a 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(51, 51, 51, 0.3);
}

.btn-github:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(51, 51, 51, 0.5);
}
