/* --- STYLE GLOBAL --- */
body {
  background-color: #0a192f;
  margin: 0;
  font-family: 'Open Sans', sans-serif;
  color: white;
  scroll-behavior: smooth;
}

/* Page d'accueil : image de fond visible */
body.home-page .hero-bg {
  display: block;
}

/* Autres pages : pas d'image de fond */
.hero-bg {
  display: none;
}

/* --- HEADER & NAVIGATION --- */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(10, 25, 47, 0.9);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 40px;
  z-index: 1000;
}

.logo {
  color: #64ffda;
  font-weight: 700;
  font-size: 1.2em;
  letter-spacing: 1px;
}

/* Décalage du menu vers la gauche */
header nav {
  position: relative;
  right: 40px;
}

/* Liens du menu avec effet animé */
nav a {
  position: relative;
  color: #64ffda;
  text-decoration: none;
  margin: 0 15px;
  font-weight: 600;
  transition: color 0.3s;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0;
  height: 2px;
  background-color: #64ffda;
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

nav a:hover {
  color: #ffffff;
}

/* Variante tactile */
@media (hover: none) and (pointer: coarse) {
  nav a:active {
    color: #64ffda;
    background-color: rgba(100, 255, 218, 0.1);
    border-radius: 4px;
    transition: background-color 0.2s;
  }
}

/* --- HERO SECTION --- */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
  background-color: #0a192f;
}

.hero-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  object-fit: contain;
  object-position: center;
  z-index: 0;
}

/* @media (max-height: 900px) {
  .hero-bg {
    object-fit: cover;
  }
} */

.hero .overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 25, 47, 0.55);
  z-index: 1;
}

.hero .content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 20px;
  color: white;
  animation: fadeIn 1.5s ease-in-out;
}

.hero h1 {
  color: #64ffda;
  font-size: 3em;
  margin-bottom: 20px;
  text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}

.hero p {
  font-size: 1.2em;
  color: #ccd6f6;
}

/* --- SECTIONS --- */
.section {
  padding: 120px 60px;
  max-width: 900px;
  margin: auto;
  line-height: 1.6;
}

h2 {
  color: #64ffda;
  border-bottom: 2px solid #64ffda;
  display: inline-block;
  margin-bottom: 20px;
  font-size: 1.8em;
}

/* --- FORMULAIRE CONTACT --- */
form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 500px;
  margin: auto;
}

input, select, textarea, button {
  padding: 10px;
  border: none;
  border-radius: 5px;
  font-size: 1em;
}

input, select, textarea {
  background-color: #112240;
  color: white;
}

button {
  background-color: #64ffda;
  color: #0a192f;
  cursor: pointer;
  font-weight: 700;
  transition: background 0.3s;
}

button:hover {
  background-color: #52d3b0;
}

/* --- FOOTER --- */
footer {
  text-align: center;
  padding: 20px;
  background-color: #0a192f;
  border-top: 1px solid #112240;
  color: #8892b0;
}

/* --- LANGUAGE SWITCH --- */
.lang-switch {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
  z-index: 1000;
}

.lang-switch img {
  width: 36px;
  height: 24px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s;
  border-radius: 4px;
}

.lang-switch img:hover {
  opacity: 1;
}

.active-flag {
  opacity: 1 !important;
  outline: 2px solid #64ffda;
}


/* --- RESPONSIVE --- */

@media (max-width: 900px) {
  header {
    flex-direction: column;
    padding: 15px 10px;
  }

  header nav {
    right: 0;
  }

  nav a {
    margin: 8px;
  }

  .hero h1 {
    font-size: 2.2em;
  }

  .hero p {
    font-size: 1em;
  }

  .section {
    padding: 80px 20px;
  }
}

/* --- ANIMATION --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
