/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

body {
  background: linear-gradient(135deg, #0f0f0f, #1a1a1a);
  color: #ffffff;
  overflow-x: hidden;
  padding-top: 90px; /* pour compenser le header fixed */
}

/* HEADER */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 10%;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.03);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

header h1 {
  font-size: 1.5rem;
  font-weight: 600;
}

nav a {
  text-decoration: none;
  color: #ccc;
  margin-left: 25px;
  transition: 0.3s ease;
  position: relative;
}

nav a::after {
  content: "";
  width: 0%;
  height: 2px;
  background: #00ffd5;
  position: absolute;
  left: 0;
  bottom: -5px;
  transition: 0.3s;
}

nav a:hover {
  color: #00ffd5;
}

nav a:hover::after {
  width: 100%;
}

/* Hero */
.hero {
  height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center; /* centre vertical du contenu */
  align-items: center;     /* centre horizontal */
  padding: 0 10%;
}

.hero h2 {
  font-size: 3rem;
  margin-bottom: 15px;
  background: linear-gradient(90deg, #00ffd5, #0099ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.2rem;
  color: #aaa;
  max-width: 500px;
}

/* SECTIONS */
section {
  padding: 120px 10%;
}

h2 {
  font-size: 2rem;
  margin-bottom: 40px;
}

/* PROJECT CARDS */
.project-card {
  position: relative;
  width: 320px;          /* largeur fixe desktop */
  max-width: 90vw;       /* ne dépasse jamais l'écran */
  flex-shrink: 0;
  height: 200px;
  border-radius: 15px;
  overflow: hidden;
  scroll-snap-align: center;
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 255, 213, 0.2);
}

.project-card h3 {
  margin-bottom: 10px;
}

.project-card p {
  color: #aaa;
  margin-bottom: 15px;
}

.project-card a {
  text-decoration: none;
  color: #00ffd5;
  margin-right: 15px;
  transition: 0.3s;
}

.project-card a:hover {
  color: #ffffff;
}

/* BUTTON STYLE */
button {
  padding: 12px 25px;
  border: none;
  background: linear-gradient(90deg, #00ffd5, #0099ff);
  color: #000;
  font-weight: bold;
  border-radius: 30px;
  cursor: pointer;
  transition: 0.3s ease;
}

button:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 25px rgba(0, 255, 213, 0.4);
}

/* ========================= */
/* SCROLL REVEAL CLEAN SYSTEM */
/* ========================= */

.reveal {
  opacity: 0;
  filter: blur(6px);
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.8s ease;
}

/* Directions */
.reveal-up {
  transform: translateY(80px);
}

.reveal-left {
  transform: translateX(-80px);
}

.reveal-right {
  transform: translateX(80px);
}

/* Active state */
.reveal.active {
  opacity: 1;
  transform: translateX(0) translateY(0);
  filter: blur(0);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  header {
    padding: 20px 5%;
  }

  .hero h2 {
    font-size: 2.2rem;
  }

  section {
    padding: 80px 5%;
  }
}

/* Container des skills */
.skills-container {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

/* Badge skill */
.skill {
  padding: 8px 16px;
  background: rgba(255,255,255,0.05);
  border-radius: 25px;
  backdrop-filter: blur(8px);
  color: #00ffd5;
  font-weight: 500;
  cursor: default;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

/* Hover léger glow */
.skill:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 20px rgba(0,255,213,0.3);
  color: #ffffff;
}

/* Gros bouton Download Resume */
.btn-resume {
  display: inline-block;
  margin-top: 80px;       /* espace entre le texte et le bouton */
  font-size: 1.3rem;      /* plus grand */
  font-weight: 700;
  color: #00ffd5;
  text-decoration: none;
  border-radius: 35px;
  border: 2px solid #00ffd5;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.05);
  padding: 18px 50px;      /* plus large et plus haut */
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Hover Glow */
.btn-resume:hover {
  color: #ffffff;
  background: rgba(0, 255, 213, 0.15);
  box-shadow: 0 12px 25px rgba(0,255,213,0.6), 0 0 25px rgba(0,255,213,0.3) inset;
  transform: translateY(-3px) scale(1.05);
}

/* Shine subtile */
.btn-resume::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(120deg, rgba(255,255,255,0.2), rgba(255,255,255,0) 70%);
  transform: rotate(45deg);
  transition: all 0.5s ease;
}

.btn-resume:hover::before {
  top: -60%;
  left: -60%;
}

#projects {
  padding: 80px 20px;
  text-align: center;
}

#projects h2 {
  font-size: 2.5rem;
  margin-bottom: 50px;
}

/* container scrollable */
.projects-container {
  display: flex;
  gap: 30px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  justify-content: center;  /* desktop : cards centrées */
  padding: 20px;            /* padding normal */
  scroll-behavior: smooth;
}

/* enlever scrollbar moche */
.projects-container::-webkit-scrollbar {
  display: none;
}

/* card */
.project-card {
  position: relative;
  min-width: 320px;
  flex-shrink: 0;
  height: 200px;
  border-radius: 15px;
  overflow: hidden;
  flex-shrink: 0;
  scroll-snap-align: center;
  cursor: pointer;
}

/* image */
.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

/* overlay */
.project-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  background: linear-gradient(transparent, rgba(0,0,0,0.9));
  transform: translateY(100%);
  transition: transform 0.4s;
}

.project-info h3 {
  margin-bottom: 5px;
}

.project-info p {
  font-size: 0.9rem;
  color: #ccc;
}

.project-info a {
  display: inline-block;
  margin-top: 10px;
  color: #00bcd4;
  text-decoration: none;
}

/* hover effects */
.project-card:hover img {
  transform: scale(1.1);
}

.project-card:hover .project-info {
  transform: translateY(0);
}

.credentials {
    display: flex;
    justify-content: center;
    text-align: center;
    font-size: small;
    padding: 16px;
}

#contact {
  padding: 80px 20px;
  text-align: center;
}

#contact h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

#contact p {
  margin: 5px 0;
  color: #666;
}

#contact a {
  margin: 5px 0;
  color: #666;
}

#contact form {
  margin: 40px auto;
  max-width: 500px;
  padding: 30px;
  background: #111;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#contact form p {
  font-size: 1.4rem;
  font-weight: bold;
  color: white;
}

#contact label {
  text-align: left;
  color: #ccc;
  font-size: 0.9rem;
}

#contact input,
#contact textarea {
  padding: 12px;
  border-radius: 6px;
  border: none;
  outline: none;
  background: #222;
  color: white;
  font-size: 1rem;
}

#contact textarea {
  min-height: 120px;
  resize: vertical;
}

#contact input:focus,
#contact textarea:focus {
  border: 1px solid #00bcd4;
}

#contact button {
  margin-top: 10px;
  padding: 12px;
  border: none;
  border-radius: 6px;
  background: #00bcd4;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.3s;
}

#contact button:hover {
  background: #0097a7;
}

/* ===================== */
/* FIX MOBILE MINIMAL    */
/* ===================== */

@media (max-width: 768px) {
  /* Projet cards responsive */
  .project-card {
    min-width: 80%;       /* prend 80% de l'écran au lieu de 320px fixe */
    height: 180px;        /* un peu plus petit pour mobile */
  }

  .projects-container {
    gap: 15px;            /* réduire espace entre cards */
    scroll-snap-type: x mandatory; /* snap sur mobile pour le scroll */
    -webkit-overflow-scrolling: touch; /* scroll fluide iOS */
    
    justify-content: flex-start;                  /* scroll horizontal = cartes alignées à gauche */
    padding-left: calc(50% - 40%);               /* centrage première card */
    padding-right: calc(50% - 40%);              /* centrage dernière card */
    padding-top: 10px;
    padding-bottom: 10px;
  }

  /* Hero / bouton resume */
  .btn-resume {
    margin-top: 50px;
    padding: 14px 40px;
    font-size: 1.1rem;
  }

  /* Ajustement section padding */
  section {
    padding: 60px 5%;     /* moins de padding sur mobile */
  }

  /* Formulaire contact */
  #contact form {
    padding: 20px;
    gap: 8px;
  }

  #contact input,
  #contact textarea {
    width: 100%;          /* pas de scroll horizontal */
  }
}