/* --- VARIABLES & RESET --- */
:root {
  --primary-color: #0f172a; /* Bleu Nuit */
  --accent-color: #f59e0b; /* Jaune Ambré */
  --text-color: #334155; /* Gris foncé */
  --bg-color: #ffffff;
  --bg-light: #f8fafc; /* Gris très clair */
  --white: #ffffff;
  --spacing: 2rem;
  --font-main: "Inter", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Prevent unintentional horizontal scroll on mobile */
html,
body {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: var(--font-main);
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--bg-color);
}

/* Prevent page scrolling when mobile menu is open */
body.menu-open {
  overflow: hidden;
}

/* --- UTILITIES --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Ensure images never overflow their container and are responsive */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

.text-center {
  text-align: center;
}

.text-gradient {
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.btn {
  display: inline-block;
  will-change: transform;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s, opacity 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.btn-primary {
  background-color: var(--accent-color);
  color: var(--primary-color); /* Contraste fort */
}

.btn-secondary {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  margin-left: 1rem;
}

/* --- HEADER --- */
.header {
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(5px);
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-text {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary-color);
}

.nav-list {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 2rem;
}

.nav-list a:not(.btn) {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
}

.burger-menu {
  display: none;
} /* Caché sur Desktop */

/* --- HERO --- */
.hero {
  padding: 6rem 0;
  text-align: center;
}

.hero-title {
  font-size: 3rem;
  line-height: 1.2;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 2.5rem;
}

/* --- SERVICES (GRID) --- */
.section {
  padding: 5rem 0;
}
.section-title {
  text-align: center;
  font-size: 2.2rem;
  color: var(--primary-color);
  margin-bottom: 3rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--white);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  transition: transform 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.icon-box {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

/* --- APPROCHE --- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.benefits-list li {
  list-style: none;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.dev-img{
  width: 100%;
  height: auto; /* Use aspect-ratio below */
  aspect-ratio: 16/9;
  min-height: 160px;
  max-height: 400px;
  background-color: #cbd5e1;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  overflow: hidden; /* Clip any overflowing child image */
}

.dev-img img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Keeps aspect ratio and fills */
  display: block;
}

/* --- FOOTER --- */
.footer {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 3rem 0;
  margin-top: 4rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer a {
  color: #cbd5e1;
  text-decoration: none;
  margin-left: 1.5rem;
}
.seo-bar {
  text-align: center;
  margin-top: 2rem;
  opacity: 0.5;
  font-size: 0.8rem;
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 768px) {
  .burger-menu {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
  }
  .bar {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 5px 0;
  }

  .hero-title {
    font-size: 2rem;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  /* Reduce placeholder image height on small screens */
  .dev-img {
    max-height: 220px;
  }
  .btn-secondary {
    margin-left: 0;
    margin-top: 1rem;
    display: block;
  }
  /* --- MOBILE MENU (À ajouter à la fin du fichier) --- */

  /* 1. Le Menu Mobile (État fermé par défaut) */
  .nav-list {
    display: flex; /* On le remet en flex */
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 75%; /* Prend 75% de la largeur */
    background-color: var(--white);
    padding-top: 5rem; /* Espace pour ne pas coller en haut */
    transform: translate3d(100%, 0, 0); /* Caché hors de l'écran à droite */
    transition: transform 0.3s ease-in-out;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 999; /* Juste sous le bouton burger */
  }

  /* 2. Le Menu Mobile (État OUVERT via JS) */
  .nav-list.active {
    transform: translate3d(0, 0, 0); /* On le ramène à l'écran */
    will-change: transform;
  }

  /* Ajustement des liens dans le menu mobile */
  .nav-list li {
    opacity: 0; /* Caché pour l'animation */
    margin: 1.5rem 0;
    text-align: center;
    transition: opacity 0.5s ease, transform 0.3s ease;
    transform: translateY(8px);
  }

  /* Animation d'apparition des liens quand ouvert */
  .nav-list.active li {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease 0.05s, transform 0.3s ease 0.05s;
  }

  /* 3. Animation du Bouton Burger (Les 3 barres deviennent une croix) */
  .burger-menu {
    z-index: 1000; /* Toujours au-dessus du menu */
    display: block;
    background: transparent;
    border: none;
    cursor: pointer;
  }

  .burger-menu span {
    transition: all 0.3s ease;
  }

  /* La croix quand c'est actif */
  .burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .burger-menu.active span:nth-child(2) {
    opacity: 0; /* La barre du milieu disparait */
  }
  .burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
  }

  /* FOOTER — MOBILE OPTIMIZATIONS */
  .footer {
    padding: 2rem 1.5rem;
  }
  .footer-content {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
  }
  .footer-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  .footer a {
    margin-left: 0;
  }
  .footer-brand p {
    margin: 0.25rem 0 0;
  }
  .seo-bar {
    font-size: 0.75rem;
    text-align: center;
    padding-top: 0.75rem;
  }
}
