/* Hero */
.hero {
  padding: 2rem 0 4rem;
  background:
    radial-gradient(
      circle at top right,
      rgba(242, 140, 40, 0.1),
      transparent 40%
    ),
    radial-gradient(
      circle at bottom left,
      rgba(0, 128, 128, 0.05),
      transparent 40%
    );
  overflow: hidden;
}

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

.hero-content h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.accent-line {
  margin-bottom: 1rem;
}

.hero-text {
  color: var(--gray-500);
  font-size: 0.9rem;
  margin-top: 1rem;
}

.strong {
  font-weight: 600;
}

.hero-image-wrapper {
  position: relative;
}

.hero-image-wrapper::before {
  content: "";
  position: absolute;
  inset: -10px;
  background: #f2f2f2;
  opacity: 0.1;
  filter: blur(40px);
  border-radius: 1rem;
  z-index: -1;
}

.hero-img {
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  aspect-ratio: 16/9;
  object-fit: cover;
}

/* =========================================
   NOTRE ÉCOSYSTÈME
========================================= */

.ecosystem-section {
  position: relative;

  padding: 1rem 0;

  overflow: hidden;

  background: radial-gradient(
    circle at center,
    rgba(0, 168, 168, 0.045),
    transparent 45%
  );
}

/* =========================================
   HEADING
========================================= */

.ecosystem-heading,
.section-heading {
  max-width: 680px;
  padding-bottom: 1rem;
  margin: 0 auto;

  text-align: center;
}

.ecosystem-heading .section-label,
.section-heading .section-label {
  display: inline-block;

  margin-bottom: 1rem;

  color: var(--brand-orange);

  font-size: 0.72rem;
  font-weight: 800;

  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.ecosystem-heading h2,
.section-heading h2 {
  margin: 0 0 1rem;

  color: var(--gray-900);

  font-size: clamp(2rem, 4vw, 3.2rem);

  font-weight: 800;

  line-height: 1.1;
}

.ecosystem-heading h2 span,
.section-heading h2 span {
  background: linear-gradient(135deg, #00a8a8, #ff8a00);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ecosystem-heading p,
.section-heading p {
  max-width: 560px;

  margin: 0 auto;

  color: var(--gray-600);

  font-size: 0.9rem;

  line-height: 1.7;
}

/* =========================================
   SYSTÈME
========================================= */

.ecosystem {
  position: relative;

  width: min(800px, 90vw);
  aspect-ratio: 1;

  margin: 0 auto;
}

/* =========================================
   ORBITES VISUELLES
========================================= */

.orbit {
  position: absolute;

  top: 50%;
  left: 50%;

  border: 1px solid rgba(0, 128, 128, 0.15);

  border-radius: 50%;

  transform: translate(-50%, -50%);

  pointer-events: none;

  z-index: 1;
}

.orbit-inner {
  width: 52%;
  height: 52%;

  border-color: rgba(242, 140, 40, 0.18);

  transform: translate(-50%, -50%) rotate(-18deg);
}

.orbit-outer {
  width: 78%;
  height: 78%;

  border-color: rgba(0, 128, 128, 0.15);

  transform: translate(-50%, -50%) rotate(12deg);
}

/* =========================================
   CENTRE / SOLEIL
========================================= */

.ecosystem-center {
  position: absolute;

  top: 50%;
  left: 50%;

  width: 28%;
  height: 28%;

  transform: translate(-50%, -50%);

  display: flex;

  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: radial-gradient(
    circle at 35% 30%,
    #00a8a8,
    #008080 55%,
    #006d70 100%
  );

  box-shadow:
    0 0 0 12px rgba(0, 128, 128, 0.06),
    0 0 60px rgba(0, 168, 168, 0.16),
    0 25px 60px rgba(0, 128, 128, 0.22);

  z-index: 20;

  text-align: center;
}

/* =========================================
   HALO
========================================= */

.center-glow {
  position: absolute;

  inset: -35px;

  border-radius: 50%;

  background: radial-gradient(circle, rgba(0, 168, 168, 0.12), transparent 68%);

  pointer-events: none;

  animation: centerPulse 5s ease-in-out infinite;
}

@keyframes centerPulse {
  0%,
  100% {
    opacity: 0.55;

    transform: scale(0.96);
  }

  50% {
    opacity: 1;

    transform: scale(1.04);
  }
}

/* =========================================
   CONTENU CENTRE
========================================= */

.center-content {
  position: relative;

  z-index: 2;

  color: white;
}

.center-small {
  display: block;

  margin-bottom: 0.5rem;

  font-size: 0.65rem;

  font-weight: 600;

  letter-spacing: 0.15em;

  text-transform: uppercase;

  opacity: 0.75;
}

.center-content h3 {
  margin: 0;

  font-size: 1.75rem;

  font-weight: 800;
}

.center-content h3 span {
  color: #ffb45c;
}

.center-line {
  width: 35px;
  height: 2px;

  margin: 0.9rem auto;

  background: #ffb45c;
}

.center-content p {
  margin: 0;

  font-size: 0.68rem;

  font-weight: 600;

  letter-spacing: 0.04em;

  opacity: 0.9;
}

/* =========================================
   PLANÈTES / NŒUDS ORBITAUX
========================================= */

.eco-node {
  position: absolute;

  top: 50%;
  left: 50%;

  width: 18%;
  height: 18%;

  margin: -72.5px 0 0 -72.5px;

  z-index: 10;

  cursor: pointer;

  /*
   * La planète tourne autour du centre.
   * La durée est identique pour toutes.
   */
  animation: ecosystemOrbit 24s linear infinite;

  /*
   * Très important :
   * le point de rotation est le centre
   * de l'écosystème.
   */
  transform-origin: 50% 50%;

  /*
   * On utilise une variable différente
   * pour chaque planète.
   */
  --orbit-angle: 0deg;
}

/* =========================================
   POSITIONS INITIALES
========================================= */

/*
 * 4 planètes espacées régulièrement :
 *
 * 01 → 0°
 * 02 → 90°
 * 03 → 180°
 * 04 → 270°
 */

.eco-mission {
  --orbit-angle: 0deg;
}

.eco-vision {
  --orbit-angle: 90deg;
}

.eco-values {
  --orbit-angle: 180deg;
}

.eco-impact {
  --orbit-angle: 270deg;
}

/* =========================================
   ORBITE
========================================= */

@keyframes ecosystemOrbit {
  from {
    transform: rotate(var(--orbit-angle)) translateX(315px)
      rotate(calc(var(--orbit-angle) * -1));
  }

  to {
    transform: rotate(calc(var(--orbit-angle) + 360deg)) translateX(315px)
      rotate(calc((var(--orbit-angle) + 360deg) * -1));
  }
}

/* =========================================
   BULLES
========================================= */

.eco-bubble {
  position: relative;

  width: 100%;
  height: 100%;

  display: flex;

  flex-direction: column;

  align-items: center;
  justify-content: center;

  border-radius: 50%;

  color: white;

  text-align: center;

  /*
   * IMPORTANT :
   * la bulle contre-rotate avec la planète.
   *
   * Cela annule la rotation de l'orbite.
   */
  animation: bubbleRotation 18s linear infinite;

  transform-origin: center;

  transition:
    box-shadow 0.35s ease,
    filter 0.35s ease;
}

.eco-bubble > * {
  /* pour que le rotate marche même sur du texte */
  display: block;
  transform-origin: center center;
  animation: mobileContentCounterRotation 18s linear infinite;
}

@keyframes bubbleRotation {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes mobileContentCounterRotation {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(-360deg);
  }
}

/* =========================================
   ANNEAU INTERNE DE LA BULLE
========================================= */

.eco-bubble::after {
  content: "";

  position: absolute;

  inset: 7px;

  border-radius: 50%;

  border: 1px solid rgba(255, 255, 255, 0.12);

  pointer-events: none;
}

/* =========================================
   NUMÉRO
========================================= */

.eco-number {
  position: absolute;

  right: 3px;

  font-size: 0.62rem;

  font-weight: 800;

  opacity: 0.65;
}

/* =========================================
   ICÔNE
========================================= */

.eco-icon {
  width: 38px;
  height: 38px;

  margin-bottom: 0.5rem;

  display: flex;

  align-items: center;
  justify-content: center;
}

.eco-icon .material-symbols-rounded {
  font-size: 30px;
}

/* =========================================
   TITRE
========================================= */

.eco-bubble h3 {
  margin: 0;

  font-size: 0.85rem;

  font-weight: 800;
}

/* =========================================
   COULEURS
========================================= */

.eco-mission .eco-bubble {
  background: radial-gradient(circle at 35% 30%, #00b7b7, #008080 60%, #006d70);

  box-shadow: 0 12px 35px rgba(0, 128, 128, 0.28);
}

.eco-vision .eco-bubble {
  background: radial-gradient(circle at 35% 30%, #ffad50, #f28c28 60%, #dc6f0b);

  box-shadow: 0 12px 35px rgba(242, 140, 40, 0.28);
}

.eco-values .eco-bubble {
  background: radial-gradient(circle at 35% 30%, #7f8fe5, #6475d9 60%, #4658bd);

  box-shadow: 0 12px 35px rgba(70, 88, 189, 0.25);
}

.eco-impact .eco-bubble {
  background: radial-gradient(circle at 35% 30%, #a676d0, #8b5fbf 60%, #70449f);

  box-shadow: 0 12px 35px rgba(112, 68, 159, 0.25);
}

/* =========================================
   INFORMATIONS
========================================= */

.eco-info {
  position: absolute;

  top: 50%;

  width: 220px;

  padding: 0.8rem 1rem;

  opacity: 0;

  pointer-events: none;

  transform: translateY(-50%) translateX(10px);

  transition:
    opacity 0.35s ease,
    transform 0.35s ease;

  z-index: 30;
}

.eco-info p {
  margin: 0;

  color: var(--gray-600);

  font-size: 0.72rem;

  line-height: 1.6;
}

/* =========================================
   POSITION DES INFORMATIONS
========================================= */

.eco-mission .eco-info {
  left: 160px;
}

.eco-vision .eco-info {
  right: 160px;

  text-align: right;
}

.eco-values .eco-info {
  left: 160px;
}

.eco-impact .eco-info {
  right: 160px;

  text-align: right;
}

/* =========================================
   NOS VALEURS
========================================= */

.values-section {
  position: relative;
  overflow: hidden;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.value-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 30px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.value-card:hover {
  transform: translateY(-6px);
  border-color: rgba(15, 23, 42, 0.18);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.value-icon {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 14px;
  background: var(--primary-color);
  color: var(--brand-teal);

  font-size: 1.2rem;
}

.value-content h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.value-content p {
  margin: 0;
  line-height: 1.7;
  font-size: 0.95rem;
}

/* Team */

.section-header {
  text-align: start;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.cta {
  padding: 4rem 0;
}

.cta-content {
  display: block;
}

.social-link .material-symbols-outlined {
  font-size: 1.1rem;
}

/* Menu logic helpers */
body.no-scroll {
  overflow: hidden;
}

/* 4. TEAM - VERSION SCROLL */
.team {
  padding: 3rem 0;
  overflow: hidden; /* évite le débordement */
}

.team-grid {
  display: grid;
  grid-auto-flow: column; /* force en ligne */
  grid-auto-columns: 75%; /* 1 carte + un bout de la suivante sur mobile */
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 1rem 1rem 2rem; /* espace pour le scroll */
  -webkit-overflow-scrolling: touch; /* scroll fluide iOS */
  scrollbar-width: none; /* cache scrollbar firefox */
}

.team-grid::-webkit-scrollbar {
  display: none; /* cache scrollbar chrome */
}

.member-card {
  scroll-snap-align: start;
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  aspect-ratio: 3/4;
  min-width: 0; /* important pour le grid */
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

.member-card:hover {
  transform: translateY(-5px);
}

.member-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.member-card:hover .member-img {
  transform: scale(1.05);
}

.member-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
  color: white;
}

.member-info h4 {
  font-size: clamp(1rem, 3vw, 1.25rem);
  margin-bottom: 0.25rem;
}

.member-info p {
  font-size: clamp(0.8rem, 2vw, 0.85rem);
  opacity: 0.9;
}

.member-socials {
  margin-top: 0.5rem;
  display: flex;
  gap: 0.5rem;
}

.member-socials .social-link {
  width: 28px;
  height: 28px;
}

/* 5. CTA */
.cta {
  padding: 3rem 0;
}

/* =========================================================
   RESPONSIVE — REGROUPEMENT DES BREAKPOINTS
   ========================================================= */

/* ===== ABOUT RESPONSIVE ===== */
/* 1. HERO */

@media (max-width: 992px) {
  .hero {
    padding: 3rem 0 4rem;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  .hero-image-wrapper {
    order: -1; /* image au dessus */
    justify-self: center;
  }
  .hero-content h1 {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
  }
  .accent-line {
    margin: 1rem auto;
  }
}

@media (min-width: 640px) {
  .team-grid {
    grid-auto-columns: 45%;
    gap: 1.5rem;
    padding: 1rem 2rem 2rem;
  }
}

@media (min-width: 1024px) {
  .team-grid {
    display: grid;
    grid-auto-flow: row;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-columns: auto;
    overflow-x: visible;
    scroll-snap-type: none;
    gap: 1.5rem;
    padding: 0;
  }

  .member-card {
    aspect-ratio: 4/5;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 1rem;
  }
}

@media (max-width: 768px) {
  .values-section {
    padding: 75px 0;
  }

  .values-section .section-heading {
    margin-bottom: 40px;
  }

  .values-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .value-card {
    padding: 24px;
  }

  .cta .cta-banner {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1.5rem;
    gap: 1.5rem;
  }
  .cta-content {
    text-align: center;
  }
}

/* =========================================
   SURVOL DESKTOP
========================================= */

@media (min-width: 640px) {
  /*
   * Lorsque la souris entre sur une planète,
   * toute sa révolution s'arrête.
   */

  .eco-node:hover {
    animation-play-state: paused;
  }

  .eco-node:hover .eco-bubble {
    animation-play-state: paused;

    /*
     * On remet explicitement la planète
     * dans une orientation lisible.
     */
    transform: rotate(0deg) scale(1.08);

    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);

    filter: brightness(1.04);
  }

  /*
   * Description invisible par défaut.
   */

  .eco-info {
    opacity: 0;

    pointer-events: none;

    transform: translateY(10px);

    transition:
      opacity 0.35s ease,
      transform 0.35s ease;
  }

  /*
   * Description visible au survol.
   */

  .eco-node:hover .eco-info {
    opacity: 1;

    transform: translateY(0);

    pointer-events: auto;
  }
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 639px) {
  .ecosystem {
    width: 100%;
    height: auto;

    aspect-ratio: auto;

    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 1.5rem;
  }

  .ecosystem-heading {
    padding-bottom: 1rem;
  }

  .orbit {
    display: none;
  }

  .ecosystem-center {
    display: none;
  }

  .eco-orbit-system {
    width: 100%;
    display: grid;
    grid-auto-rows: 1fr; /* toutes les lignes = même hauteur */
    gap: 1.5rem;
    justify-items: center; /* équivalent de align-items: center */
  }

  /*
   * Pas de révolution autour du centre.
   */

  .eco-node {
    position: relative;

    left: auto;

    width: 100%;

    margin: 0;

    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;

    gap: 1rem;

    /*
     * IMPORTANT :
     * aucune animation orbitale.
     */
    animation: none;

    transform: none !important;
  }

  /*
   * Mais les bulles continuent à tourner
   * sur elles-mêmes.
   */

  .eco-bubble {
    width: 30%;
    aspect-ratio: 1 / 1; /* garde le cercle */
    height: auto; /* OBLIGATOIRE, enlève le 100% */
    flex-shrink: 0; /* empêche la bulle de s'écraser */

    animation: mobileBubbleRotation 18s linear infinite;
  }

  /*
   * Ici on fait tourner uniquement la bulle.
   */

  @keyframes mobileBubbleRotation {
    from {
      transform: rotate(0deg);
    }

    to {
      transform: rotate(360deg);
    }
  }

  .eco-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 1rem;
  }

  .eco-bubble h3 {
    font-size: 0.65rem;
  }

  /*
   * Les descriptions sont toujours visibles
   * sur mobile.
   */

  .eco-info {
    position: relative;

    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;

    width: auto;

    max-width: 190px;

    padding: 0 0 0 1rem;

    opacity: 1;

    transform: none !important;

    pointer-events: auto;

    text-align: left !important;
  }
}

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

@media (max-width: 1024px) {
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .value-card {
    gap: 15px;
    padding: 20px;
  }

  .value-icon {
    flex-basis: 45px;
    width: 45px;
    height: 45px;
    font-size: 1rem;
  }
}
