@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;500;600;700&display=swap');

/* =========================
   VARIABLES
========================= */
:root {
  --bleu-nuit:   #202f4c;
  --bleu-sombre: #16243a;
  --gris-texte:  #505060;
  --gris-leger:  #777;
  --fond-section: #f7f8fa;
  --bordure:     #e6e8ec;
  --blanc:       #ffffff;

  --largeur-max: 1120px;
  --gap-section: 5rem;
  --gap-texte:   1.2rem;
  --hauteur-header: 80px;

  --transition: 0.2s ease;
  --font-corps: 'Lato', sans-serif;
}

/* =========================
   RESET & BASE
========================= */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-corps);
  font-weight: 400;
  color: #1a1a1a;
  line-height: 1.75;
  background: var(--blanc);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1 0 auto;
}

a {
  text-decoration: none;
}

/* =========================
   CONTENEURS
========================= */
.container {
  max-width: var(--largeur-max);
  margin: 0 auto;
  padding: 0 2rem;
}

.narrow {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

/* =========================
   TYPOGRAPHIE
========================= */
h1 {
  font-size: 2.6rem;
  font-weight: 400;
  color: var(--bleu-nuit);
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--bleu-nuit);
  margin-bottom: 2rem;
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

p {
  color: var(--gris-texte);
  margin-bottom: var(--gap-texte);
}

ul {
  padding-left: 1.2rem;
  margin-bottom: var(--gap-texte);
}

li {
  margin-bottom: 0.5rem;
}

/* =========================
   SECTIONS
========================= */
.section {
  padding: var(--gap-section) 0;
}

.section-light {
  background: var(--fond-section);
}

/* Trait décoratif sous les titres de section */
.section-title {
  position: relative;
  padding-bottom: 0.9rem;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--bleu-nuit);
}

/* Centré pour les sections CTA */
.cta-section .section-title::after {
  left: 50%;
  transform: translateX(-50%);
}

/* =========================
   HERO
========================= */
.hero {
  padding: 6rem 0 5rem;
  text-align: center;
  border-bottom: 1px solid var(--bordure);
}


.hero-subtitle {
  max-width: 720px;
  margin: 0 auto 2rem;
  font-size: 1.15rem;
  color: var(--gris-texte);
  line-height: 1.8;
}

/* =========================
   GRILLE 2 COLONNES
========================= */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.domain-target {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--bleu-nuit);
  margin-top: 0.8rem;
}

/* =========================
   IMAGES INDUSTRIE
   (3 photos côte à côte)
========================= */
.grid-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
}

.grid-images img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

/* =========================
   BOUTONS
========================= */
.btn-primary {
  display: inline-block;
  padding: 0.85rem 1.8rem;
  background: var(--bleu-nuit);
  color: var(--blanc);
  font-family: var(--font-corps);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background var(--transition);
}

.btn-primary:hover {
  background: var(--bleu-sombre);
  color: var(--blanc);
}

.btn-nav {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  background: var(--bleu-nuit);
  color: var(--blanc) !important;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: 3px;
  transition: background var(--transition);
}

.btn-nav:hover {
  background: var(--bleu-sombre);
}

/* =========================
   HEADER
========================= */
.site-header {
  position: sticky;
  top: 0;
  background: var(--blanc);
  border-bottom: 1px solid var(--bordure);
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--hauteur-header);
}

/* Logo : image + texte côte à côte */
.logo-block {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-img {
  height: 50px;
  width: auto;
  object-fit: contain;
  display: block;
}

.logo-text-block {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--bleu-nuit);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.baseline {
  font-size: 0.78rem;
  color: var(--gris-leger);
  font-weight: 400;
}

/* =========================
   NAVIGATION DESKTOP
========================= */
.main-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
  align-items: center;
}

.main-nav li {
  margin: 0;
}

.main-nav a {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  color: #444;
  font-size: 0.92rem;
  font-weight: 600;
  transition: color var(--transition);
}

.main-nav a:not(.btn-nav):hover {
  color: var(--bleu-nuit);
}

/* =========================
   HAMBURGER
========================= */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  position: relative;
  z-index: 9999; /* au-dessus de l'overlay */
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--bleu-nuit);
  transition: transform var(--transition), opacity var(--transition), background var(--transition);
}

/* Barres blanches quand l'overlay est ouvert */
.hamburger.active span {
  background: var(--blanc);
}

/* Animation en croix */
.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* =========================
   MENU MOBILE — OVERLAY PLEIN ÉCRAN
========================= */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(18, 26, 44, 0.97);
  z-index: 9998;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  text-align: center;
}

.mobile-menu li {
  margin: 0;
}

.mobile-menu a {
  display: inline-block;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  transition: color var(--transition);
}

.mobile-menu a:hover {
  color: var(--blanc);
}

/* Dernier lien (Contact) légèrement mis en avant */
.mobile-menu li:last-child a {
  color: var(--blanc);
  font-weight: 500;
  font-size: 1.3rem;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 0.6rem 1.8rem;
  border-radius: 3px;
  transition: background var(--transition), color var(--transition);
}

.mobile-menu li:last-child a:hover {
  background: rgba(255,255,255,0.1);
}

/* =========================
   OVERLAY CONTACT
========================= */
.contact-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.contact-overlay.active {
  display: flex;
}

.contact-box {
  background: var(--blanc);
  padding: 2.5rem 3rem;
  max-width: 400px;
  width: 90%;
  position: relative;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

.contact-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--bleu-nuit);
  margin: 0 0 1.4rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid var(--bleu-nuit);
}

.contact-content {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.contact-content p {
  margin: 0;
  color: #333;
  font-size: 0.93rem;
  line-height: 1.9;
}

.contact-content a {
  color: var(--bleu-nuit);
  font-weight: 500;
  transition: opacity var(--transition);
}

.contact-content a:hover {
  opacity: 0.65;
}

.close-contact {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #aaa;
  cursor: pointer;
  line-height: 1;
  transition: color var(--transition);
  padding: 0;
}

.close-contact:hover {
  color: #333;
}

.reseaux-icones {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 0.6rem;
}

.reseaux-icones img {
  width: 26px;
  height: 26px;
  opacity: 0.7;
  transition: opacity var(--transition), transform var(--transition);
}

.reseaux-icones img:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* =========================
   CTA SECTION
========================= */
.cta-section {
  text-align: center;
}

.cta-section h2 {
  margin-bottom: 0.8rem;
}

.cta-section p {
  margin-bottom: 2rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* =========================
   PIED DE PAGE
========================= */
#piedpage {
  flex-shrink: 0;
  display: block;
  width: 100%;
  background: var(--bleu-nuit);
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  padding: 1.2rem 2rem;
  font-size: 0.82rem;
  font-weight: 300;
  letter-spacing: 0.02em;
}

.lienpied {
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--transition);
}

.lienpied:hover {
  color: var(--blanc);
}

/* =========================
   SCROLL TO TOP
   — carré, sobre, cohérent
========================= */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 40px;
  height: 40px;
  background: var(--bleu-nuit);
  color: var(--blanc);
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease,
              transform 0.2s ease, background var(--transition);
  z-index: 500;
  /* Pas d'arrondi — cohérent avec le style du site */
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  background: var(--bleu-sombre);
  transform: translateY(-3px);
}

/* =========================
   RESPONSIVE — TABLETTE
========================= */
@media (max-width: 900px) {

  :root {
    --gap-section: 3.5rem;
    --hauteur-header: 68px;
  }

  .main-nav {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .logo-img {
    height: 38px;
  }

  .logo-text {
    font-size: 1.1rem;
  }

  /* Baseline masquée pour gagner de la place */
  .baseline {
    display: none;
  }

  .grid-2 {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .grid-images {
    grid-template-columns: 1fr;
  }

  .grid-images img {
    height: 200px;
  }

  .hero {
    padding: 3.5rem 0 3rem;
  }

}

/* =========================
   RESPONSIVE — MOBILE
========================= */
@media (max-width: 600px) {

  .container {
    padding: 0 1.2rem;
  }

  .contact-box {
    padding: 2rem 1.5rem;
  }

  .scroll-to-top {
    bottom: 1.2rem;
    right: 1.2rem;
    width: 36px;
    height: 36px;
  }

}

/* =========================
   LIEN DANS LE CORPS DE TEXTE
========================= */
.lien-texte {
  color: var(--bleu-nuit);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s ease;
}

.lien-texte:hover {
  opacity: 0.65;
}