/* ==============================================
   RESET DE BASE
   ============================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  font-family: 'Arial', sans-serif;
  color: #ffffff;
  height: 100%;
  background-color: #0a0f1c;
  /* fond gris très foncé en cas d’absence de Hero */
}

/* ==============================================
   VARIABLES DE COULEURS
   ============================================== */
:root {
  --couleur-primaire: #00c3a3;
  --couleur-secondaire: #0072a3;
  --blanc: #ffffff;
  --gris-fonce: #0a0f1c;
  --gris-medium: #1e2635;
}

/* ==============================================
   CONTENEURS RÉUTILISABLES
   ============================================== */
.container-nav,
.container-footer,
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ==============================================
   BARRE DE NAVIGATION FIXE
   ============================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--gris-fonce);
  z-index: 1000;
}

.container-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

/* Logo réduit à 50px de hauteur */
.logo img {
  height: 50px;
  width: auto;
}

/* Menu principal (desktop) */
.menu ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.menu ul li a {
  text-decoration: none;
  color: var(--blanc);
  font-weight: 500;
  transition: color 0.3s;
}

.menu ul li a:hover,
.menu ul li a.active {
  color: var(--couleur-primaire);
}

/* Bouton hamburger (mobile) masqué en desktop */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--blanc);
  cursor: pointer;
}

/* ==============================================
   SECTION HERO (hauteur réduite et overlay)
   ============================================== */
.hero {
  position: relative;
  /* pour overlay */
  margin-top: 80px;
  /* pour ne pas être masqué par la navbar */
  height: 60vh;
  /* 60% de la hauteur du viewport */
  background: no-repeat center center / cover;
  display: flex;
  align-items: center;
  /* centre verticalement .hero-content */
  justify-content: center;
  /* centre horizontalement .hero-content */
  text-align: center;
  overflow: hidden;
  /* pour que l’overlay ne déborde pas */
}

/* Superposition sombre (overlay) */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 15, 28, 0.6);
  z-index: 1;
  /* placé juste au-dessus du fond, en dessous du contenu */
}

.hero-content {
  position: relative;
  /* pour que le contenu soit au-dessus de l’overlay */
  z-index: 2;
  max-width: 800px;
  padding: 0 1rem;
}

.hero-content h1 {
  font-size: 3rem;
  color: #ffffff;
  /* toujours blanc sur l’overlay sombre */
  margin-bottom: 1rem;
  line-height: 1.1;
}

.hero-content h1 span.highlight {
  color: var(--couleur-primaire);
}

.hero-content p {
  font-size: 1.2rem;
  color: #ffffff;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* Bouton d’appel à l’action (ex. “Voir nos projets”) */
.btn-cta {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--couleur-primaire);
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.btn-cta:hover {
  background-color: var(--couleur-secondaire);
}

/* ==============================================
   SECTIONS DE CONTENU (fond gris moyen, espace réduit)
   ============================================== */
.section-content,
.intro {
  background-color: var(--gris-medium);
  padding: 2rem 0;
  /* espace vertical réduit */
}

.section-content h2,
.intro h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--couleur-primaire);
  text-align: center;
}

.section-content p,
.intro p {
  font-size: 1rem;
  line-height: 1.6;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

/* ---------------------------------------
   Annuler le fond sombre si nécessaire
   (utile pour section “Qui sommes-nous ?” sur Hero)
   --------------------------------------- */
.section-content.no-background {
  background-color: transparent;
  padding-top: 2rem;
  /* ajustez si besoin d’un petit espacement vertical */
  padding-bottom: 2rem;
}

/* ==============================================
   SECTION “QUI SOMMES-NOUS ?”
   ============================================== */
.about-text {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
  text-align: center;
}

.about-text h1 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
  color: var(--couleur-primaire);
  line-height: 1.2;
}

.about-text p {
  font-size: 1rem;
  line-height: 1.6;
  color: #ffffff;
  margin-bottom: 1.5rem;
  text-align: justify;
}

/* ==============================================
   SECTION “NOS PROJETS” – VIGNETTES DE PROJET
   ============================================== */
.services-section {
  background-color: var(--gris-medium);
  padding: 2rem 0;
}

.services-section h2 {
  color: var(--couleur-primaire);
  text-align: center;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.services-accroche {
  color: #f0f0f0;
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.4;
}

/* Grille principale pour disposer les cartes */
.services-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 1.5rem;
  margin-top: 1rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  flex-wrap: wrap;
}

.service-card {
  width: 320px;
  margin-left: auto;
  margin-right: auto;
}

@media screen and (max-width: 700px) {
  .services-grid {
    flex-direction: column;
    align-items: center;
    max-width: 95vw;
  }

  .service-card {
    width: 95vw;
    max-width: 350px;
  }
}

@media screen and (max-width: 700px) {
  .services-grid {
    flex-direction: column;
    align-items: center;
    max-width: 95vw;
  }
}

@media screen and (max-width: 700px) {
  .services-grid {
    grid-template-columns: 1fr;
    max-width: 95vw;
  }
}

/* Structure de chaque carte de projet */
.service-card {
  background-color: var(--gris-fonce);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease-in-out;
}

.service-card:hover {
  transform: translateY(-4px);
}

.service-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.service-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem 1.25rem;
}

.service-card-content h3 {
  font-size: 1.25rem;
  color: #ffffff;
  margin-bottom: 0.5rem;
  text-align: center;
}

.service-card-content .tagline {
  font-size: 0.95rem;
  color: #f0f0f0;
  flex-grow: 1;
  margin-bottom: 1rem;
  text-align: center;
}

.service-card-content .btn-cta {
  align-self: center;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
}

/* ==============================================
   SECTION “NOTRE ÉQUIPE” – VIGNETTES DE MEMBRES
   ============================================== */
.equipe-section {
  background-color: var(--gris-fonce);
  padding: 2rem 0;
}

.equipe-section h2 {
  color: var(--couleur-primaire);
  margin-bottom: 1.5rem;
  text-align: center;
}

/* Grille pour contenir les cartes de l’équipe */
.equipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.equipe-card {
  background-color: var(--gris-medium);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease-in-out;
}

.equipe-card:hover {
  transform: translateY(-4px);
}

.equipe-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  color: var(--blanc);
  text-align: center;
}

.equipe-card .compétences,
.equipe-card .role {
  font-size: 0.95rem;
  color: #f0f0f0;
  margin-bottom: 0.5rem;
}

.equipe-card .compétences strong,
.equipe-card .role strong {
  color: var(--couleur-primaire);
}

/* ==============================================
   SECTION “ACTUALITÉS” – CARTES D’ACTUALITÉ
   ============================================== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.news-card {
  background-color: var(--gris-medium);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.news-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
  border-color: var(--couleur-primaire);
}

.news-card-image {
  width: 100%;
  height: 220px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.news-card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-card-content h3 {
  font-size: 1.4rem;
  color: var(--couleur-primaire);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.news-card-content h3 a {
  color: inherit;
  text-decoration: none;
}

.news-card-content .subtitle {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--blanc);
  margin-bottom: 1rem;
}

.news-card-content p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0;
  text-align: left;
}

.news-tag {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background-color: var(--couleur-primaire);
  color: var(--gris-fonce);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
  z-index: 2;
}

@media screen and (max-width: 600px) {
  .news-grid {
    grid-template-columns: 1fr;
  }
}

/* ==============================================
   PIED DE PAGE FIXE
   ============================================== */
.footer {
  background-color: var(--gris-fonce);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 30px 0;
  margin-top: auto;
}

.container-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

/* Force les 3 blocs à occuper de l'espace pour le centrage */
.container-footer>p,
.container-footer>ul {
  flex: 1;
  margin: 0;
}

.container-footer>ul {
  display: flex;
  justify-content: flex-end;
}

.footer-eco-note {
  flex: 2;
  /* Plus d'espace pour le texte long */
  text-align: center;
  min-width: 300px;
}

.footer-eco-note p {
  font-size: 0.64rem !important;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  display: inline-block;
  /* Pour le centrage interne si besoin */
}

/* Ajustements mobile */
@media (max-width: 768px) {
  .container-footer {
    flex-direction: column;
    text-align: center;
  }

  .container-footer>p,
  .container-footer>ul,
  .footer-eco-note {
    flex: none;
    width: 100%;
    justify-content: center;
  }
}

.social-links {
  list-style: none;
  display: flex;
  gap: 1rem;
}

.social-links li a {
  color: var(--blanc);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s;
}

.social-links li a:hover {
  color: var(--couleur-primaire);
}

/* ==============================================
   RESPONSIVE (mobile ≤ 768px)
   ============================================== */
@media screen and (max-width: 768px) {
  .menu ul {
    position: fixed;
    top: 70px;
    right: -100%;
    flex-direction: column;
    background-color: var(--gris-fonce);
    width: 200px;
    height: calc(100vh - 70px);
    padding-top: 1rem;
    transition: right 0.3s;
    z-index: 999;
  }

  .menu ul.show {
    right: 0;
  }

  .menu ul li {
    margin-bottom: 1rem;
    text-align: center;
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    height: 50vh;
    /* hauteurs réduites sur mobile */
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .about-text h1 {
    font-size: 1.75rem;
  }

  .about-text p {
    font-size: 0.95rem;
  }
}

/* ==============================================
   RESPONSIVE (mobile ≤ 600px spécifiques à grid)
   ============================================== */
@media screen and (max-width: 600px) {
  .services-grid {
    grid-template-columns: 1fr;
    /* une seule colonne */
  }

  .service-card img {
    height: 150px;
    /* hauteur d’image réduite */
  }

  .service-card-content h3 {
    font-size: 1.1rem;
  }

  .service-card-content .tagline {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
  }

  .service-card-content .btn-cta {
    font-size: 0.9rem;
    padding: 0.45rem 0.9rem;
  }

  .equipe-grid {
    grid-template-columns: 1fr;
    /* une seule colonne */
  }

  .equipe-card {
    padding: 0.75rem;
  }

  .equipe-card h3 {
    font-size: 1.1rem;
  }

  .equipe-card .compétences,
  .equipe-card .role {
    font-size: 0.9rem;
  }
}

/* … vos autres règles … */
main {
  margin-bottom: 4rem;
  /* Laisse 4 rem d’espace avant le footer */
  padding-bottom: 80px;
}

/* ==============================================
   STYLES POUR FORMULAIRE (CONTACT)
   ============================================== */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--couleur-primaire);
}

@media screen and (max-width: 600px) {
  .btn-cta {
    width: 100%;
    text-align: center;
  }
}

/* ==============================================
   MISSION – Animation des statistiques
   ============================================== */
.mission-section {
  padding: 4rem 0;
  background-color: var(--gris-medium);
}

.mission-stats {
  font-size: 6rem;
  /* taille très grande */
  font-weight: bold;
  color: var(--couleur-primaire);
  text-align: center;
  margin-bottom: 1rem;
  /* espace sous l’animation */
  min-height: 1.2em;
  /* pour éviter saut de layout */
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.mission-stats.visible {
  opacity: 1;
}

/* Titre "Notre mission" plus petit que l'animation */
.mission-section h2 {
  font-size: 2.5rem;
  /* plus petit que 6rem */
  color: var(--couleur-primaire);
  text-align: center;
  margin-bottom: 1rem;
}

/* Texte de la mission : même taille que le titre h2 */
.mission-section p {
  font-size: 2.5rem;
  font-weight: 600;
  line-height: 1.4;
  color: #ffffff;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

/* Responsive : adapter sur mobile */
@media screen and (max-width: 768px) {
  .mission-stats {
    font-size: 4rem;
  }

  .mission-section h2 {
    font-size: 2rem;
  }

  .mission-section p {
    font-size: 2rem;
  }
}

@media screen and (max-width: 600px) {
  .mission-stats {
    font-size: 3rem;
  }

  .mission-section h2 {
    font-size: 1.75rem;
  }

  .mission-section p {
    font-size: 1.75rem;
  }
}

/* ==============================================
   LANGUAGE SWITCHER
   ============================================== */
.lang-switcher {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  color: var(--blanc);
  font-size: 0.85rem;
  margin-left: 1rem;
  flex-wrap: wrap;
  /* Permet le passage à la ligne si besoin */
}

.lang-switcher a {
  text-decoration: none;
  color: var(--blanc);
  font-weight: 500;
  transition: color 0.3s;
  padding: 2px 4px;
}

.lang-switcher a:hover,
.lang-switcher a.active-lang {
  color: var(--couleur-primaire);
  border-bottom: 2px solid var(--couleur-primaire);
}

@media screen and (max-width: 1024px) {
  .lang-switcher {
    font-size: 0.75rem;
    gap: 0.3rem;
  }
}

@media screen and (max-width: 768px) {
  .lang-switcher {
    margin-left: 0;
    margin-right: 0.5rem;
    justify-content: flex-end;
    max-width: 150px;
  }
}