:root {
  --bg: #ffffff;
  --fg: #1F517E; /* Bleu profond Impulsea */
  --muted: #4FAF9C; /* Vert feutré */
  --accent: #35A7A2; /* Turquoise */
  --accent-light: #A9DAD4; /* Bleu clair menthe */
  --accent-warm: #F2B63F; /* Jaune ocre */
  --card: #F8FFFE; /* Blanc cassé très léger */
  --border: #E0F2F1; /* Bordure douce menthe */
}

* { 
  box-sizing: border-box; 
}

html {
  margin: 0;
  min-height: 100vh;
}

body { 
  margin: 0; 
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; 
  color: var(--fg); 
  line-height: 1.6;
  min-height: 100vh;
  background-color: #ffffff;
  background-image: url('images/Trame-impulsea.webp');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('images/Trame-impulsea.webp');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0.15;
  z-index: -1;
  pointer-events: none;
}

a { 
  color: var(--accent); 
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover { 
  color: var(--fg);
  text-decoration: none;
}

.container { 
  max-width: 1100px; 
  margin: 0 auto; 
  padding: 0 1rem; 
}

header { 
  position: sticky; 
  top: 0; 
  backdrop-filter: saturate(180%) blur(10px); 
  background: rgba(255,255,255,0.95); 
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(31, 81, 126, 0.05);
  z-index: 100;
}

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

.brand { 
  display: inline-flex; 
  align-items: baseline; 
  gap: .4rem; 
  font-weight: 700; 
  letter-spacing: .2px;
  font-size: 1.3rem;
}

.brand .logo {
  height: 50px;
  width: auto;
  display: block;
}

.brand span { 
  color: var(--accent); 
}

.brand strong {
  color: var(--fg);
}

nav ul { 
  display: flex; 
  gap: 1rem; 
  list-style: none; 
  padding: 0; 
  margin: 0; 
}

nav a { 
  font-weight: 600; 
  color: var(--fg);
  position: relative;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--accent);
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

nav a.linkedin-link {
  color: #0077B5;
  font-weight: 600;
}

nav a.linkedin-link:hover {
  color: #005582;
}

nav a.linkedin-link::after {
  background: #0077B5;
}

/* Menu hamburger (caché sur desktop) */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
  transition: transform 0.3s ease;
}

.menu-toggle span {
  width: 28px;
  height: 3px;
  background: var(--fg);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
  background: var(--accent);
}

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

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
  background: var(--accent);
}

/* Empêcher le scroll quand le menu est ouvert */
body.menu-open {
  overflow: hidden;
}

.hero { 
  padding: 6rem 0 8rem; 
  background: linear-gradient(135deg, #A9DAD4 0%, #ffffff 50%, #FFF9ED 100%);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-text {
  position: relative;
  z-index: 1;
}

.hero-image {
  position: relative;
  z-index: 1;
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: 2rem;
  box-shadow: 0 10px 40px rgba(31, 81, 126, 0.2);
  object-fit: cover;
  max-height: 500px;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(53, 167, 162, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(242, 182, 63, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero h1 { 
  font-size: clamp(1.5rem, 2.5vw + 0.8rem, 2.2rem); 
  line-height: 1.3; 
  margin: 0 0 1rem;
  font-weight: 700;
  color: var(--fg);
  position: relative;
  z-index: 1;
}

.hero p { 
  font-size: clamp(1rem, 1.2vw + .8rem, 1.25rem); 
  color: var(--fg); 
  max-width: 60ch;
  opacity: 0.85;
  position: relative;
  z-index: 1;
}

.hero .cta { 
  margin-top: 1.5rem; 
  display: inline-flex; 
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.btn { 
  display: inline-block; 
  padding: .9rem 1.5rem; 
  border-radius: 50px;
  border: 2px solid var(--accent); 
  background: var(--accent); 
  color: white; 
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(53, 167, 162, 0.2);
}

.btn:hover {
  background: var(--fg);
  border-color: var(--fg);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(31, 81, 126, 0.3);
}

.btn.secondary { 
  background: transparent; 
  color: var(--fg); 
  border-color: var(--fg);
  box-shadow: none;
}

.btn.secondary:hover {
  background: var(--fg);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(31, 81, 126, 0.2);
}

.btn.yellow { 
  background: #F2B63F; 
  border-color: #F2B63F;
  box-shadow: 0 4px 12px rgba(242, 182, 63, 0.2);
}

.btn.yellow:hover {
  background: #e0a52e;
  border-color: #e0a52e;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(242, 182, 63, 0.3);
}

section { 
  padding: 10rem 0;
  position: relative;
}

/* Réduire l'espacement entre mission et les bulles */
#mission {
  padding-bottom: 5rem;
}

#mission + section {
  padding-top: 5rem;
}

section h2 { 
  font-size: 2rem; 
  margin: 0 0 1.5rem;
  font-weight: 700;
  color: var(--fg);
}

.lead { 
  color: var(--fg);
  opacity: 0.8;
  max-width: 75ch;
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

/* Section Mission */
.mission-content {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 3rem;
}

.mission-image img {
  width: 100%;
  height: auto;
  border-radius: 2rem;
  box-shadow: 0 10px 40px rgba(31, 81, 126, 0.2);
  object-fit: cover;
  max-height: 450px;
}

.mission-text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mission-text h2 {
  margin-bottom: 0.5rem;
}

/* Sections Expertises */
.expertise-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.expertise-reverse {
  direction: ltr;
}

.expertise-text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Couleurs des titres selon les sections */
#conseil-rh h2 {
  color: #F2B63F;
}

#culture-rse h2 {
  color: #35A7A2;
}

#sensibilisation h2 {
  color: #1F517E;
}

.expertise-image img {
  width: 100%;
  height: auto;
  border-radius: 2rem;
  box-shadow: 0 10px 40px rgba(31, 81, 126, 0.2);
  object-fit: cover;
  max-height: 400px;
}

.grid { 
  display: grid; 
  gap: 1rem; 
}

@media (min-width: 768px) { 
  .grid.cols-3 { 
    grid-template-columns: repeat(3, 1fr); 
  } 
  .grid.cols-2 { 
    grid-template-columns: repeat(2, 1fr); 
  } 
}

.card { 
  background: var(--card); 
  border: 1px solid var(--border); 
  border-radius: 1.5rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(31, 81, 126, 0.05);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(53, 167, 162, 0.15);
}

.card h3 { 
  margin-top: 0; 
  font-size: 1.2rem;
  color: var(--fg);
  font-weight: 600;
}

.tag { 
  display: inline-block; 
  font-size: .85rem; 
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
  color: white;
  border: none;
  padding: .4rem .8rem; 
  border-radius: 50px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(53, 167, 162, 0.2);
}

.stats { 
  display: grid; 
  grid-template-columns: repeat(3, 1fr); 
  gap: 1.5rem; 
}

.stat { 
  background: var(--accent-light);
  border: none;
  color: white;
  padding: 3rem 2rem; 
  border-radius: 50%;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  aspect-ratio: 1;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
  text-decoration: none;
  cursor: pointer;
}

.stat:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(79, 175, 156, 0.2);
}

.stat-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.stat span {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  color: white;
}

.stat-yellow {
  background: #F2B63F;
}

.stat-yellow:hover {
  box-shadow: 0 8px 24px rgba(242, 182, 63, 0.4);
}

.stat-green {
  background: var(--accent);
}

.stat-green:hover {
  box-shadow: 0 8px 24px rgba(79, 175, 156, 0.4);
}

.stat-blue {
  background: #1F517E;
}

.stat-blue:hover {
  box-shadow: 0 8px 24px rgba(31, 81, 126, 0.4);
}

.team { 
  display: grid; 
  gap: 1rem; 
}

@media (min-width: 768px) { 
  .team { 
    grid-template-columns: repeat(2, 1fr); 
  } 
}

.member { 
  display: grid; 
  gap: .5rem; 
  padding: 2rem; 
  border: 2px solid var(--border); 
  border-radius: 2rem;
  align-items: start;
  text-align: left;
  background: var(--card);
  transition: all 0.3s ease;
}

.member:hover {
  border-color: var(--accent-light);
  box-shadow: 0 8px 24px rgba(53, 167, 162, 0.12);
  transform: translateY(-4px);
}

.member-photo-container {
  position: relative;
  width: 100%;
  max-width: 300px;
  height: 250px;
  margin: 1rem auto;
}

.member-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 90%;
  height: 90%;
  object-fit: contain;
  z-index: 1;
}

.member-photo {
  position: absolute;
  bottom: 10%;
  right: 35%;
  width: 75%;
  height: 75%;
  border-radius: 50%;
  object-fit: cover;
  z-index: 2;
  border: none;
  box-shadow: none;
  aspect-ratio: 1 / 1;
  background: transparent;
}

.member-photo-ophelie {
  right: 30%;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%; /* Ratio 16:9 */
  height: 0;
  overflow: hidden;
  max-width: 800px;
  margin: 2rem auto;
  border-radius: 1rem;
  box-shadow: 0 8px 24px rgba(31, 81, 126, 0.15);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 1rem;
}

.member h3 { 
  margin: 1rem 0 0.5rem;
  font-size: 1.4rem;
  color: var(--fg);
  font-weight: 700;
}

.muted { 
  color: var(--muted);
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

footer { 
  padding: 3rem 0; 
  border-top: 2px solid var(--border); 
  color: var(--fg);
  background: linear-gradient(180deg, #ffffff 0%, #F8FFFE 100%);
}

.small { 
  font-size: .9rem;
  opacity: 0.8;
}

/* ===================================
   RESPONSIVE - MOBILE
   =================================== */

@media (max-width: 767px) {
  /* Navigation mobile */
  .nav {
    flex-wrap: nowrap;
    height: 64px;
    padding: 0;
  }

  .brand .logo {
    height: 40px;
  }

  /* Afficher le bouton hamburger */
  .menu-toggle {
    display: flex;
  }

  /* Menu mobile en overlay */
  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: linear-gradient(135deg, var(--accent-light) 0%, #ffffff 100%);
    box-shadow: -4px 0 20px rgba(31, 81, 126, 0.15);
    transition: right 0.4s ease;
    z-index: 1000;
    padding: 6rem 2rem 2rem;
    overflow-y: auto;
  }

  nav.active {
    right: 0;
  }

  nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0;
    margin: 0;
  }

  nav li {
    width: 100%;
    border-bottom: 1px solid rgba(31, 81, 126, 0.1);
  }

  nav li:last-child {
    border-bottom: none;
  }

  nav a {
    font-size: 1.1rem;
    padding: 1.2rem 1rem;
    display: block;
    color: var(--fg);
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: 12px;
    margin: 0.3rem 0;
  }

  nav a:hover {
    background: rgba(53, 167, 162, 0.1);
    color: var(--accent);
    transform: translateX(8px);
  }

  nav a::after {
    display: none;
  }

  /* Overlay sombre derrière le menu */
  nav.active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(31, 81, 126, 0.5);
    z-index: -1;
    animation: fadeIn 0.3s ease;
  }

  @keyframes fadeIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }

  /* Hero section mobile */
  .hero {
    padding: 3rem 0 5rem;
  }

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

  /* Image au-dessus sur mobile */
  .hero-image {
    order: -1;
  }

  .hero-image img {
    max-height: 300px;
  }

  .hero::before,
  .hero::after {
    width: 250px;
    height: 250px;
  }

  .hero .cta {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  /* Sections spacing */
  section {
    padding: 6.5rem 0;
  }

  section h2 {
    font-size: 1.5rem;
  }

  /* Mission mobile */
  .mission-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
  }

  /* Expertises mobile */
  .expertise-content,
  .expertise-reverse {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .expertise-reverse .expertise-image {
    order: 1;
  }

  .expertise-reverse .expertise-text {
    order: 2;
  }

  .mission-image {
    order: -1;
  }

  .mission-image img {
    max-height: 300px;
  }

  .lead {
    font-size: 1rem;
  }

  /* Stats en colonne sur mobile */
  .stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .stat b {
    font-size: 1.8rem;
  }

  /* Grilles en une colonne sur mobile */
  .grid.cols-3,
  .grid.cols-2 {
    grid-template-columns: 1fr !important;
  }

  /* Cards mobile */
  .card {
    padding: 1.2rem;
  }

  /* Member cards */
  .member {
    padding: 1.5rem;
  }

  .member-photo-container {
    max-width: 250px;
    height: 200px;
  }

  .member h3 {
    font-size: 1.2rem;
  }

  .muted {
    font-size: 0.85rem;
    letter-spacing: 0.5px;
  }

  /* Footer */
  footer {
    padding: 2rem 0;
  }
}

/* Tablettes */
@media (min-width: 768px) and (max-width: 1024px) {
  .stats {
    grid-template-columns: 1fr;
  }

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