/* =========================
   VARIABLES CSS
========================= */

:root {
  --color-primary: #1faa6f;
  --color-primary-dark: #178a5a;
  --color-primary-light: #e9f8f0;
  --color-bg-alt: #f3fdf8;
  --color-text: #0a3d2c;
  --color-text-light: #4a6d5f;
  --color-white: #fff;
  --color-border: #cceedd;
  --shadow-sm: 0 2px 8px rgba(10, 61, 44, 0.08);
  --shadow-md: 0 4px 16px rgba(10, 61, 44, 0.12);
  --shadow-lg: 0 8px 32px rgba(10, 61, 44, 0.16);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition: 0.3s ease;
}

/* =========================
   GLOBAL
========================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--color-text);
  line-height: 1.7;
  font-size: 16px;
}

/* =========================
   HEADER
========================= */

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  box-shadow: var(--shadow-md);
}

.header-content {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-text {
  text-align: left;
}

.header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.logo {
  width: 80px;
  height: auto;
  border-radius: var(--radius-sm);
}

.subtitle {
  margin: 4px 0 0 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

.nav {
  display: flex;
  gap: 8px;
}

.nav a {
  color: var(--color-white);
  padding: 10px 18px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition), transform var(--transition);
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.nav a:focus {
  outline: 2px solid var(--color-white);
  outline-offset: 2px;
}

/* Menu hamburger - caché par défaut sur desktop */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--color-white);
  border-radius: 3px;
  transition: var(--transition);
}

/* =========================
   HERO
========================= */

.hero {
  text-align: center;
  padding: 80px 20px;
  background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-bg-alt) 100%);
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%231faa6f' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
  pointer-events: none;
}

.hero h2 {
  margin: 0 0 15px 0;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-text);
  position: relative;
}

.hero p {
  font-size: 1.2rem;
  color: var(--color-text-light);
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.btn {
  display: inline-block;
  margin-top: 30px;
  padding: 16px 32px;
  background: var(--color-primary);
  color: var(--color-white);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1.05rem;
  box-shadow: var(--shadow-md);
  transition: all var(--transition);
  position: relative;
}

.btn:hover {
  background: var(--color-primary-dark);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.btn:focus {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}

/* =========================
   TEXTES SEO
========================= */

.intro {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
  font-size: 1.1rem;
  text-align: center;
  color: var(--color-text-light);
}

.section-text {
  max-width: 800px;
  margin: 0 auto 40px auto;
  padding: 0 20px;
  font-size: 1.05rem;
  text-align: center;
  color: var(--color-text-light);
}

/* =========================
   SECTIONS
========================= */

.section {
  padding: 60px 20px;
  max-width: 1200px;
  margin: auto;
  scroll-margin-top: 100px;
}

.section[id] {
  scroll-margin-top: 100px;
}

.section.alt {
  background: var(--color-bg-alt);
  max-width: 100%;
}

.section.alt > * {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.section h3 {
  text-align: center;
  margin: 0 0 20px 0;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text);
  position: relative;
}

.section h3::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--color-primary);
  margin: 15px auto 0;
  border-radius: 2px;
}

.subsection-title {
  text-align: center;
  margin: 60px 0 20px 0;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-text-light);
}

/* =========================
   GRILLES / CARTES
========================= */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  padding: 0 20px;
}

.card {
  background: var(--color-white);
  border: none;
  padding: 30px 25px;
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  border-left: 4px solid var(--color-primary);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card strong {
  display: block;
  font-size: 1.1rem;
  color: var(--color-primary);
  margin-bottom: 10px;
}

/* =========================
   LOGOS CLIENTS
========================= */

.logos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 30px;
  align-items: center;
  justify-items: center;
  margin-top: 40px;
  padding: 0 20px;
}

.logos-grid img {
  max-width: 140px;
  max-height: 70px;
  object-fit: contain;
  opacity: 1;
  transition: transform var(--transition), box-shadow var(--transition);
  padding: 15px;
  background: var(--color-white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.logos-grid img:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

/* =========================
   SLIDER
========================= */

.slider-container {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

.slider {
  width: 100%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 50vh;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.slide {
  position: absolute;
  width: 100%;
  height: 50vh;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  padding: 20px;
}

.slide.active {
  opacity: 1;
  position: relative;
}

/* Flèches de navigation */
.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--color-white);
  color: var(--color-primary);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: all var(--transition);
  z-index: 10;
}

.slider-nav:hover {
  background: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-50%) scale(1.1);
}

.slider-nav.prev {
  left: 30px;
}

.slider-nav.next {
  right: 30px;
}

/* Indicateurs (dots) */
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 25px;
  flex-wrap: wrap;
  padding: 0 20px;
}

.slider-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-border);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.slider-dot:hover {
  background: var(--color-primary-dark);
}

.slider-dot.active {
  background: var(--color-primary);
  transform: scale(1.2);
}

/* Compteur de slides */
.slider-counter {
  text-align: center;
  margin-top: 15px;
  font-size: 0.9rem;
  color: var(--color-text-light);
}

/* =========================
   MISSIONS
========================= */

.missions {
  list-style: none;
  padding: 0;
  margin: 40px auto 0;
  max-width: 700px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 15px;
}

.missions li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  background: var(--color-white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.missions li:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-md);
}

.missions li::before {
  content: '✓';
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
}

/* =========================
   CONTACT
========================= */

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  max-width: 800px;
  margin: 0 auto;
}

.contact-info {
  text-align: left;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  padding: 15px;
  background: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.contact-item:hover {
  transform: translateX(5px);
  background: var(--color-primary-light);
}

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: 50%;
  font-size: 1.2rem;
}

.contact-item a {
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition);
}

.contact-item a:hover {
  color: var(--color-primary);
}

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

.qrcode {
  display: block;
  margin: 0 auto;
  padding: 20px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.qr-label {
  margin-top: 15px;
  font-size: 0.9rem;
  color: var(--color-text-light);
}

/* =========================
   FOOTER
========================= */

.footer {
  text-align: center;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 40px 20px 30px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  text-align: left;
  margin-bottom: 30px;
}

.footer-section h4 {
  margin: 0 0 15px 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.footer-section p,
.footer-section a {
  margin: 8px 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  display: block;
}

.footer-section a:hover {
  color: var(--color-white);
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 20px;
  font-size: 0.9rem;
  opacity: 0.9;
}

/* =========================
   BOUTON RETOUR EN HAUT
========================= */

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) rotate(-90deg);
  transition: all var(--transition);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) rotate(-90deg);
}

.back-to-top:hover {
  background: var(--color-primary-dark);
  transform: translateY(-5px) rotate(-90deg);
}

/* =========================
   ANIMATIONS
========================= */

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 900px) {
  .header {
    padding: 15px 20px;
  }

  .header h1 {
    font-size: 1.2rem;
  }

  .subtitle {
    font-size: 0.8rem;
  }

  .hero h2 {
    font-size: 1.8rem;
  }

  .hero {
    padding: 50px 20px;
  }

  .section h3 {
    font-size: 1.6rem;
  }

  .contact-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

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

  .contact-item {
    justify-content: center;
  }

  .slider-nav {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .slider-nav.prev {
    left: 10px;
  }

  .slider-nav.next {
    right: 10px;
  }
}

@media (max-width: 768px) {
  /* Menu mobile */
  .menu-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--color-primary-dark);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
    transition: right var(--transition);
    box-shadow: var(--shadow-lg);
  }

  .nav.open {
    right: 0;
  }

  .nav a {
    width: 100%;
    text-align: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .menu-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }

  .menu-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  .header-content {
    gap: 15px;
  }

  .logo {
    width: 60px;
  }

  .header h1 {
    font-size: 1rem;
  }

  .hero h2 {
    font-size: 1.5rem;
  }

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

  .btn {
    padding: 14px 28px;
    font-size: 1rem;
  }

  .section {
    padding: 40px 15px;
  }

  .section h3 {
    font-size: 1.4rem;
  }

  .intro,
  .section-text {
    font-size: 0.95rem;
  }

  .grid {
    gap: 16px;
    padding: 0;
  }

  .card {
    padding: 20px 15px;
  }

  .slider {
    min-height: 35vh;
  }

  .slide {
    height: 35vh;
    padding: 10px;
  }

  .slider-dots {
    gap: 8px;
  }

  .slider-dot {
    width: 10px;
    height: 10px;
  }

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

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 12px 15px;
  }

  .logo {
    width: 50px;
  }

  .header h1 {
    font-size: 0.9rem;
  }

  .subtitle {
    display: none;
  }

  .hero {
    padding: 40px 15px;
  }

  .hero h2 {
    font-size: 1.3rem;
  }

  .slider-nav {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .slider-nav.prev {
    left: 5px;
  }

  .slider-nav.next {
    right: 5px;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
}
