/* 🔄 Reset & base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

html, body {
  height: 100%;
  font-family: 'Segoe UI', sans-serif;
  color: #333;
}

body {
  padding-left: 1rem;
  padding-right: 1rem;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.page-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  box-sizing: border-box;
}

body.loaded {
  opacity: 1;
}

section {
  scroll-margin-top: 80px; /* ou la hauteur exacte de ton header */
}

/* 🎯 Typography */

h1, h2 {
  font-weight: 700;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  color: #f0f0f0; /* ✅ texte clair sur fond sombre */
  margin-bottom: 0.5rem;
  line-height: 1.2;
}


h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: #f0f0f0;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: clamp(1.2rem, 3vw, 2rem);
  margin-bottom: 0.5rem;
}

p {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  line-height: 1.6;
}

/* 🧭 Header */

.svg-ciel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -3;
  pointer-events: none;
}





.svg-dune-front {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 20vh;
  transform-origin: bottom center;
  transition: transform 0.4s ease-out;
  z-index: -1;
  pointer-events: none;
  
}








.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem 1rem;
  background-color: transparent;
}

.hero p {
  color: #f0f0f0;
  background: none;
  padding: 0;
  border-radius: 0;
  margin-top: 0.5rem;
  line-height: 1.4;
  font-size: clamp(1rem, 3vw, 1.5rem);
}


.hero-logo {
width: auto;
  height: clamp(180px, 40vh, 351px);
  max-height: 351px;  height: auto;
  mix-blend-mode: lighten;
  filter: drop-shadow(0 2px 6px rgba(255,255,255,0.2));
  margin: 1rem 0;
  z-index: 0;
}



.hero strong {
  display: block;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  color: #ffffff; /* ✅ texte visible */
  text-shadow: 0 2px 6px rgba(0,0,0,0.6); /* ✅ détachement net */
  margin-top: 1rem;
  letter-spacing: 0.05em;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}


.hero strong.visible {
  opacity: 1;
  transform: translateY(0);
}

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


header p {
  font-size: clamp(1rem, 3vw, 1.5rem);
  color: #333;
  margin-top: 0.5rem;
  line-height: 1.4;
}


.topbar.hide {
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.clickable-logo {
  transition: transform 0.3s ease;
}

.clickable-logo.clicked {
  animation: pulseLogo 0.4s ease;
}

@keyframes pulseLogo {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.15) rotate(5deg); }
  100% { transform: scale(1); }
}


.burger {
  cursor: pointer;
  z-index: 1000;
}

.burger svg {
  width: 48px;
  height: 48px;
}

.burger svg .line {
  fill: none;
  stroke: #ffffff;
  stroke-width: 6;
  stroke-linecap: round;
  transition: all 0.3s ease;
}

.burger.open .top {
  transform: rotate(45deg);
  transform-origin: 50% 50%;
  d: path("M 30,50 L 70,50");
}

.burger.open .middle {
  opacity: 0;
}

.burger.open .bottom {
  transform: rotate(-45deg);
  transform-origin: 50% 50%;
  d: path("M 30,50 L 70,50");
}


.burger:hover {
  transform: scale(1.1);
}

.logo-link {
  display: flex;
  align-items: center;
  margin-top: -20px;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.05em;
}

.mobile-menu {
  position: absolute;
  top: 70px;
  right: 2rem;
  background-color: #003366;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  padding: 1rem;
  display: none;
  flex-direction: column;
  gap: 1rem;
  z-index: 999;
  animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.mobile-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-menu li a {
  color: #ffffff;
  text-decoration: none;
  font-size: 1.2rem;
  transition: color 0.2s ease;
}

.mobile-menu li a:hover {
  color: #00aaff;
}

.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
   z-index: 9998;
}

.menu-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.side-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 260px;
  height: 100%;
  background-color: #1a1a2e;
  backdrop-filter: blur(6px);
  box-shadow: -4px 0 12px rgba(0,0,0,0.2);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transform: translateX(100%);
  transition: transform 0.4s ease;
  z-index: 9999;
}

.side-menu.open {
  transform: translateX(0);
}

.side-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.side-menu li a {
  font-family: 'Segoe UI', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #ffffff;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 0.25rem;
  transition: background-color 0.3s ease, color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.menu-icon {
  width: 20px;
  height: 20px;
  stroke: #ffffff;
  margin-right: 0.5rem;
  transition: stroke 0.3s ease;
  flex-shrink: 0;
}

.side-menu li a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #00aaff;
}

.side-menu li a:hover .menu-icon {
  stroke: #00aaff;
}

body.menu-open {
  overflow: hidden;
    padding-right: 17px; /* compense la disparition de la scrollbar */
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 10rem 2rem 1rem;
  text-align: center;
}


/* 🧱 Projects */
.projects {
  padding: 3rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.projects h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: #003366;
  margin-bottom: 2rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  justify-items: center;
  position: relative;
}

.card {
  text-decoration: none !important;
  color: #ffffff !important;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background-color: #003366;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: transform 0.3s ease;
  max-width: 100%;
  position: relative;
  z-index: 10;
  
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.card img {
  width: 100%;
  border-radius: 0.75rem;
  object-fit: cover;
  margin-bottom: 1rem;
  transition: transform 0.4s ease;
}

.card:hover img {
  transform: scale(1.05);
  
}

/* ✅ Typo lisible */
.card h3 {
  text-align: center;
  justify-content: center;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  text-decoration: none !important;
}

.external-icon {
  font-size: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover .external-icon {
  opacity: 1;
}

.card p {
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  line-height: 1.6;
  color: #f0f0f0;
  text-decoration: none !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

/* slide avis */

.slider-wrapper {
  padding: 3rem 2rem; /* identique à .contact */
  max-width: 800px;
  margin: 0 auto;
}

.djinn-slider {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2rem;
  background-color: #003366;
  border-radius: 1rem;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  box-sizing: border-box;
  height: 220px;
  overflow: hidden;
  display: flex;
  align-items: center; /* ✅ vertical centering */
  justify-content: center; /* ✅ horizontal centering */
}




.djinn-slide {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  padding: 1rem 1.5rem;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 1s ease-in-out;
}

.djinn-slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}




.stars {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  color: gold;
  margin-bottom: 0.5rem;
}

.djinn-slide p {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 0.5rem;
  color: #f0f0f0;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6); /* même effet que .card p */
}

.djinn-slide span {
  font-size: 0.95rem;
  color: #aaa;
}


/* 📬 Contact */
.contact {
  padding: 3rem 2rem;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.contact-form {
  background-color: #003366;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form label {
  color: #ffffff;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: 600;
  margin-bottom: 0.25rem;
  display: block;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  line-height: 1.5;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #ffffff;
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.contact-form button {
  background-color: #0057b8;
  color: #ffffff;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.contact-form button:hover {
  background-color: #004a99;
  transform: translateY(-2px);
}

textarea {
  height: 280px; /* ou 96px si tu veux plus compact */
  resize: none;
  overflow-y: auto;
  line-height: 1.5;
  white-space: pre-wrap;
  padding: 0.75rem 1rem;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  border-radius: 0.5rem;
  border: 1px solid #ccc;
}

textarea:focus {
  caret-color: #00bcd4;
  outline: none;
  border-color: #ffffff;
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.contact-social {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.contact-social img {
  width: clamp(40px, 5vw, 64px); /* ✅ responsive entre mobile et desktop */
  height: auto;
  object-fit: contain;
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
}

.contact-social img:hover {
  transform: scale(1.1);
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
}

/* 🦶 Footer styles */

.footer {
  position: relative;
  z-index: 0; /* ✅ plus bas que .footer-content */
  background-color: transparent; /* ❌ pas de bleu */
  color: #ffffff;
  padding-bottom: 8rem; /* ✅ espace pour SVG */
  overflow: visible; /* ✅ permet au contenu de dépasser */
  margin-top: 4rem;
}


.footer-content {
  position: absolute;
  bottom: 0; /* ✅ colle le contenu en bas */
  left: 0;
  width: 100%;
  z-index: 2;
  padding: 0 2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}


.footer p {
  font-size: 1rem;
  margin: 0;
}





/* 📱 Mobile adjustments */
@media (max-width: 600px) {
  body {
    padding-left: 0;
    padding-right: 0;
  }

  .projects {
    padding: 2rem 1rem;
    display: grid;
    justify-items: center;
  }

  .card {
    width: 100%;
    max-width: 400px;
    padding: 1rem;
  }
   .contact {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .contact-form {
    width: 100%;
    max-width: 500px; /* ✅ limite la largeur pour centrage */
    margin-left: auto;
    margin-right: auto; /* ✅ centrage horizontal */
    padding: 1rem;
  }

  .contact-form button {
    width: 100%;
    align-self: stretch;
  }
}






/* 🖥️ Ultra-wide screens */
@media (min-width: 1200px) {
  .contact-form {
    max-width: 700px;
  }
}

/* section de tests */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px; /* hauteur fixe pour contenir l’onde */
  z-index: 9997;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.2rem;
  background: transparent;
  box-shadow: none; /* supprime l’ombre */
  transition: transform 0.3s ease;
  transform: translateZ(0);
  will-change: transform;
  isolation: isolate;
}


.topbar-wave {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.topbar-wave svg {
  display: block;
  width: 100%;
  height: 100%;
}

.logo-link,
.burger {
  position: relative;
  z-index: 1; /* au-dessus de l’onde */
}


.dune-background {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  z-index: -2;
  pointer-events: none;
}

/*card what i do*/
.skills-section {
  padding: 4rem 2rem;
  background-color: transparent;
  text-align: center;
}

.skills-section h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  color: #f0f0f0;
  margin-bottom: 2rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  justify-items: center;
}

.skill-card {
  background-color: #003366;
  color: #f0f0f0;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  max-width: 100%;
  transition: transform 0.3s ease;
}

.skill-card:hover {
  transform: translateY(-5px);
}

.skill-card h3 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 1rem;
}

.skill-card p {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  line-height: 1.6;
}
