/* ═══════════════════════════════════════════════════════════════
   EGS MCC — Mobile responsive & badges activités
   Breakpoints : 1024 / 768 / 560 / 380
   ═══════════════════════════════════════════════════════════════ */

html, body { max-width: 100%; overflow-x: hidden; }
img, svg, video { max-width: 100%; height: auto; }

/* ───── Badges d'icône sur les cards activités ───── */
.activity__img { position: relative; }
.activity__icon {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  box-shadow: 0 8px 24px -8px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.5) inset;
  z-index: 2;
  transition: transform .35s var(--ease-out), background .25s var(--ease-out);
}
.activity__icon svg { width: 26px; height: 26px; stroke-linecap: round; stroke-linejoin: round; }
.activity:hover .activity__icon { transform: scale(1.06) rotate(-3deg); background: var(--accent); color: #fff; }

/* ─────────────────── ≤ 1024px ─────────────────── */
@media (max-width: 1024px) {
  .activities__grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
  .commit__grid { grid-template-columns: repeat(2, 1fr); }
  .rec-jobs__grid { grid-template-columns: repeat(2, 1fr); }
  .rec-why__grid { grid-template-columns: repeat(2, 1fr); }
  .feature-work { grid-template-columns: 1fr; }
  .feature-work__gallery { order: -1; }
  .rec-apply__inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .rec-apply__left { position: static; }
}

/* ─────────────────── ≤ 768px ─────────────────── */
@media (max-width: 768px) {
  :root {
    --section-y: clamp(3rem, 9vw, 4.5rem);
    --gutter: 1.25rem;
  }

  /* HERO */
  .hero { min-height: 88vh; padding-top: 4rem; }
  .hero__frame { padding: 3.5rem var(--gutter) 4rem; }
  .hero__title { font-size: clamp(2rem, 9vw, 3.2rem); line-height: 1.05; }
  .hero__lede { font-size: 1rem; margin-bottom: 2rem; }
  .hero__eyebrow { font-size: .65rem; gap: .5rem; margin-bottom: 1.5rem; }
  .hero__eyebrow::before { width: 22px; }
  .hero__dots { bottom: 1.2rem; }
  .hero__dots button { width: 24px; }
  .hero__dots button.is-active { width: 36px; }

  /* INTRO */
  .intro { padding: 3rem var(--gutter); }
  .intro__tagline { font-size: clamp(1.3rem, 5vw, 1.7rem); line-height: 1.3; }

  /* PRÉSENTATION */
  .present__inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .present__title { font-size: clamp(1.6rem, 6vw, 2.2rem); }
  .present__stats { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .stat { padding: 1.5rem 1.25rem; }
  .stat__num { font-size: clamp(1.8rem, 7vw, 2.4rem); }
  .stat__label { font-size: .78rem; }

  /* ACTIVITÉS */
  .activities__grid { grid-template-columns: 1fr; gap: 1rem; }
  .activities__head h2 { font-size: clamp(1.6rem, 6vw, 2.2rem); line-height: 1.15; }
  .activity__img { height: 220px; }
  .activity__body { padding: 1.5rem; }
  .activity__body h3 { font-size: 1.25rem; }
  .activity__icon { width: 46px; height: 46px; top: .85rem; right: .85rem; }
  .activity__icon svg { width: 22px; height: 22px; }

  /* ENGAGEMENTS */
  .commit__grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .commit__head h2 { font-size: clamp(1.6rem, 6vw, 2.2rem); }
  .commit__head p { font-size: 1rem; }
  .pillar { padding: 2rem 1.5rem; }
  .pillar svg { width: 36px; height: 36px; margin-bottom: 1rem; }
  .pillar h3 { font-size: 1.2rem; }

  /* TÉMOIGNAGES */
  .testimonials__head h2 { font-size: clamp(1.6rem, 6vw, 2.2rem); }
  .testimonials__track { animation-duration: 45s; gap: 1rem; }
  .quote { flex-basis: 280px; padding: 1.5rem 1.25rem 1.25rem; }
  .quote p { font-size: .92rem; }
  .quote__mark { width: 30px; height: 30px; }

  /* CERTIFICATIONS */
  .certs__grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .certs__head h2 { font-size: clamp(1.5rem, 6vw, 2rem); }
  .cert { padding: 1.5rem 1rem; }

  /* WORKS */
  .works__head h2 { font-size: clamp(1.6rem, 6vw, 2.2rem); }
  .works__head p { font-size: 1rem; }
  .feature-work { gap: 1.5rem; padding: 0 var(--gutter); }
  .feature-work__body { padding: 0; }
  .feature-work__body h3 { font-size: 1.5rem; }
  .feature-work__main { height: 220px; }
  .feature-work__strip { grid-template-columns: repeat(4, 1fr); gap: .5rem; }
  .feature-work__thumb { height: 60px; }
  .feature-work__credits { grid-template-columns: 1fr; gap: .75rem; }
  .feature-work__tag { font-size: .7rem; }

  /* ZONE IDF */
  .zone__inner { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
  .zone__text .kicker { display: inline-flex; }
  .zone__title { font-size: clamp(1.6rem, 6vw, 2.2rem); }
  .zone__lede { font-size: 1rem; }
  .zone__fig { max-width: 480px; margin: 0 auto; }
  .idf { width: 100%; height: auto; }

  /* FAQ */
  .faq__head h2 { font-size: clamp(1.6rem, 6vw, 2.2rem); }
  .faq__item summary { padding: 1.25rem 1rem; font-size: 1rem; }
  .faq__content { padding: 0 1rem 1.25rem; }

  /* CONTACT */
  .contact__inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .contact__title { font-size: clamp(1.6rem, 6vw, 2.2rem); }
  .contact__lede { font-size: 1rem; }
  .contact__channels li { padding: 1rem 0; }
  .contact__form { padding: 1.75rem 1.25rem; }
  .field-row { grid-template-columns: 1fr; gap: 0; }

  /* FOOTER */
  .footer__inner { grid-template-columns: 1fr; gap: 2rem; text-align: center; padding: 2.5rem var(--gutter); }
  .footer__brand { justify-content: center; }
  .footer__cols { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; text-align: left; }
  .footer__cols h4 { font-size: .85rem; }
  .footer__cols a, .footer__cols span { font-size: .85rem; }
  .footer__bar { flex-direction: column; gap: .75rem; text-align: center; padding: 1.5rem var(--gutter); font-size: .8rem; }

  /* RECRUTEMENT */
  .rec-hero { min-height: 64vh; padding-top: 4rem; }
  .rec-hero__frame { padding: 3rem var(--gutter) 3.5rem; }
  .rec-why__grid { grid-template-columns: 1fr; gap: 1rem; }
  .rec-why__head h2 { font-size: clamp(1.6rem, 6vw, 2.2rem); }
  .rec-why__card { padding: 1.75rem 1.5rem; }
  .rec-why__card h3 { font-size: 1.1rem; }
  .rec-jobs__grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .rec-jobs__head h2 { font-size: clamp(1.7rem, 6.5vw, 2.4rem); }
  .rec-jobs__head p { font-size: .95rem; }
  .rec-job { padding: 1.75rem 1.5rem; }
  .rec-job h3 { font-size: 1.15rem; }
  .rec-job__head { font-size: .68rem; flex-wrap: wrap; gap: .5rem; }
  .rec-process__steps { grid-template-columns: 1fr; gap: 1.25rem; }
  .rec-process__steps::before { display: none; }
  .rec-process__step { display: flex; gap: 1rem; align-items: flex-start; padding-top: 0; }
  .rec-process__step h3 { font-size: 1rem; }
  .rec-process__num { flex-shrink: 0; width: 40px; height: 40px; margin-bottom: 0; font-size: .9rem; }
  .rec-apply__form { padding: 1.75rem 1.25rem; }
  .rec-apply__left h2 { font-size: clamp(1.6rem, 6vw, 2.2rem); }
}

/* ─────────────────── ≤ 560px ─────────────────── */
@media (max-width: 560px) {
  :root { --gutter: 1rem; }

  .hero { min-height: 92vh; }
  .hero__title { font-size: clamp(1.9rem, 11vw, 2.6rem); }
  .hero__ctas { flex-direction: column; align-items: stretch; gap: .65rem; }
  .hero__ctas .btn { width: 100%; justify-content: center; padding: 1rem 1.5rem; font-size: .9rem; }

  .present__stats { grid-template-columns: 1fr; gap: .75rem; }
  .stat { padding: 1.25rem 1.25rem; }
  .stat__num { font-size: 2.2rem; }
  .stat__label { font-size: .78rem; }

  .certs__grid { grid-template-columns: 1fr 1fr; gap: .75rem; }
  .cert { padding: 1.25rem .75rem; }
  .cert strong { font-size: .9rem; }
  .cert span { font-size: .72rem; }

  .testimonials { padding: 3rem 0; }
  .testimonials__head { margin-bottom: 2rem; padding: 0 var(--gutter); }
  .testimonials__track { gap: .85rem; animation-duration: 38s; }
  .quote { flex-basis: 250px; padding: 1.25rem 1.1rem 1.1rem; }
  .quote p { font-size: .88rem; line-height: 1.5; }
  .quote__mark { width: 26px; height: 26px; }

  .feature-work__main { height: 200px; }
  .feature-work__body h3 { font-size: 1.3rem; }
  .feature-work__strip { grid-template-columns: repeat(2, 1fr); }
  .feature-work__thumb { height: 80px; }

  .footer__cols { grid-template-columns: 1fr; gap: 1.75rem; text-align: center; }
  .footer__cols a, .footer__cols span { display: block; }

  .nav__inner { padding: .75rem var(--gutter); gap: .5rem; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-name { font-size: .9rem; }
  .brand-sub { font-size: .58rem; }
  .nav__cta { display: inline-flex; padding: .45rem .85rem; font-size: .75rem; }

  .rec-hero__frame { padding: 2.5rem var(--gutter) 3rem; }
  .rec-job__list li { font-size: .88rem; }
  .rec-job__cta { padding: .75rem 1.2rem; font-size: .85rem; width: 100%; justify-content: center; }
  .rec-apply__bullets li { font-size: .88rem; }

  input[type="text"], input[type="email"], input[type="tel"],
  select, textarea, .btn {
    min-height: 44px;
    font-size: 16px;
  }

  .devis-modal { padding: 0; align-items: flex-end; }
  .devis-modal__panel {
    max-height: 92vh;
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    padding: 1.75rem 1.25rem 1.25rem;
  }
  .devis-modal__close { top: .75rem; right: .75rem; width: 36px; height: 36px; }
  .devis-modal__head h2 { font-size: 1.3rem; }
  .devis-modal__form .field-row { grid-template-columns: 1fr; gap: 0; }
}

/* ─────────────────── ≤ 380px ─────────────────── */
@media (max-width: 380px) {
  :root { --gutter: .85rem; }
  .hero__title { font-size: clamp(1.7rem, 11vw, 2.2rem); }
  .hero__lede { font-size: .92rem; }
  .brand-sub { display: none; }
  .stat__num { font-size: 2rem; }
  .quote { flex-basis: 230px; }
  .activity__icon { width: 40px; height: 40px; }
  .activity__icon svg { width: 20px; height: 20px; }
}

/* Touch device */
@media (hover: none) and (pointer: coarse) {
  .activity:hover, .stat:hover, .pillar:hover,
  .feature-work:hover, .rec-job:hover,
  .rec-why__card:hover, .quote:hover, .cert:hover { transform: none; }
  .activity:hover .activity__icon { transform: none; background: rgba(255,255,255,.92); color: var(--accent); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .15s !important;
    scroll-behavior: auto !important;
  }
  .testimonials__track { animation: none; transform: translateX(0); }
  .hero__slide.is-active { animation: none; }
  .idf__pulse { animation: none; opacity: 0; }
  .idf__star { animation: none; }
}
