/* ============================================================
   IMMEIT — RESPONSIVE V2
   Audit & Correctifs Responsivité PRO
   Adapté aux classes BEM réelles du HTML
   ============================================================ */

/* ── 1. VARIABLES & BASE ──────────────────────────────────── */

:root {
  --bp-mobile: 480px;
  --bp-tablet: 768px;
  --bp-laptop: 1024px;
  --bp-desktop: 1280px;

  --space-xs:  clamp(0.5rem, 1vw, 0.75rem);
  --space-sm:  clamp(0.75rem, 1.5vw, 1rem);
  --space-md:  clamp(1rem, 2.5vw, 1.5rem);
  --space-lg:  clamp(1.5rem, 4vw, 3rem);
  --space-xl:  clamp(2rem, 6vw, 5rem);
  --space-xxl: clamp(3rem, 8vw, 7rem);

  --container-padding: clamp(1rem, 5vw, 2rem);
}

html {
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

img, video, canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

input, textarea, select, button {
  font-size: 16px;
  font-family: inherit;
}

button, a, [role="button"],
input[type="submit"], input[type="button"] {
  min-height: 44px;
  cursor: pointer;
}

/* ── PREFERS-REDUCED-MOTION ──────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── 2. TYPOGRAPHIE FLUIDE ───────────────────────────────── */

h1, .h1-like {
  font-size: clamp(1.75rem, 4vw + 0.75rem, 3.5rem);
  line-height: 1.15;
}

h2, .section__title {
  font-size: clamp(1.35rem, 2.5vw + 0.5rem, 2.25rem);
  line-height: 1.25;
}

h3 {
  font-size: clamp(1.1rem, 1.5vw + 0.5rem, 1.5rem);
  line-height: 1.3;
}

h4 {
  font-size: clamp(0.95rem, 1vw + 0.5rem, 1.15rem);
}

p, .section__text {
  font-size: clamp(0.9rem, 1.2vw + 0.5rem, 1.05rem);
  max-width: 70ch;
}

.section__title {
  font-size: clamp(1.35rem, 2.5vw + 0.5rem, 2.25rem);
}

.display-4 { font-size: clamp(2.5rem, 6vw, 4rem); }
.display-5 { font-size: clamp(2rem, 5vw, 3.5rem); }
.display-6 { font-size: clamp(1.75rem, 4.5vw, 3rem); }
.h1-responsive { font-size: clamp(2rem, 5vw, 3.5rem); }
.h2-responsive { font-size: clamp(1.75rem, 4.5vw, 3rem); }
.h3-responsive { font-size: clamp(1.5rem, 4vw, 2.5rem); }
.h4-responsive { font-size: clamp(1.25rem, 3.5vw, 2rem); }
.text-lead { font-size: clamp(1rem, 2.5vw, 1.25rem); line-height: 1.7; }

/* ── 3. NAVIGATION MOBILE ────────────────────────────────── */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(17, 25, 39, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(36, 48, 68, 0.6);
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  gap: 5px;
  padding: 0;
  z-index: 1001;
  min-height: 44px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text, #f1f5f9);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

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

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav__links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    flex-direction: column;
    background: var(--bg-card, #1a2537);
    padding: 5rem 2rem 2rem;
    gap: 0;
    transition: right 0.3s ease;
    z-index: 999;
    overflow-y: auto;
    align-items: flex-start;
  }

  .nav__links.open {
    right: 0;
  }

  .nav__links .nav__link {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.75rem 0;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border, #243044);
    min-height: 56px;
  }

  .nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .nav-overlay.active {
    opacity: 1;
    pointer-events: all;
  }

  .nav__logo-text small {
    display: block;
    font-size: 0.4rem;
    white-space: nowrap;
  }

  .nav__inner {
    width: 100%;
    padding-left: max(16px, var(--container-padding));
    padding-right: max(16px, var(--container-padding));
  }
}

/* ── 4. HERO SECTION ─────────────────────────────────────── */

@media (max-width: 900px) {
  .hero__inner {
    display: flex;
    flex-direction: column;
  }

  .hero__logos {
    position: static;
    flex-direction: column;
    align-items: center;
    margin-top: 1.5rem;
    order: 2;
  }

  .hero__logos-title {
    width: 160px;
    height: 56px;
  }

  .hero__content {
    order: 1;
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding-top: calc(70px + var(--space-xl));
    padding-bottom: var(--space-xl);
  }

  .hero__content {
    max-width: 100%;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

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

  .hero__gear,
  .hero__particles {
    display: none !important;
  }

  .hero__stats-group {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .hero__actions {
    flex-direction: column;
  }

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

/* ── 5. GRILLES RESPONSIVES ──────────────────────────────── */

.services__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-xl);
  justify-content: center;
}

.piliers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.perf__grid,
.engagement__grid,
.testimonials__grid {
  display: grid;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.methodo__grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.service-card,
.methodo__card {
  border-radius: 12px;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.service-card {
  min-height: 200px;
}

.methodo__card {
  min-height: 180px;
  flex: 1;
  min-width: clamp(180px, 25vw, 220px);
}

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

  .engagement__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .methodo__grid {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .methodo__grid::-webkit-scrollbar {
    display: none;
  }
  .methodo__card {
    min-width: clamp(200px, 60vw, 280px);
    flex-shrink: 0;
    scroll-snap-align: start;
  }
}

@media (min-width: 901px) {
  .methodo__grid {
    overflow-x: visible;
    flex-wrap: wrap;
  }
  .methodo__card {
    min-width: 0;
    flex: 1;
  }
  .methodo-dots {
    display: none;
  }
}

.methodo-dots {
  display: none;
  justify-content: center;
  gap: 6px;
  margin-top: 1.5rem;
}

@media (max-width: 900px) {
  .methodo-dots {
    display: flex;
  }
}

.methodo-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: #fff;
  opacity: 0.3;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  min-height: unset;
}

.methodo-dots .dot.active {
  opacity: 1;
  transform: scale(1.3);
}

@media (max-width: 768px) {
  .services__grid,
  .piliers-grid,
  .perf__grid,
  .engagement__grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .service-card,
  .methodo__card {
    min-height: auto;
  }
}

/* ── 6. SECTION ABOUT ────────────────────────────────────── */

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

@media (max-width: 768px) {
  .about__grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .about__logo-showcase {
    max-width: 280px;
    margin: 0 auto;
  }
}

/* ── 7. HERO LOGOS (PARTENAIRES) ─────────────────────────── */

.hero__logos-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 4vw, 3rem);
  flex-wrap: wrap;
}

.hero__logos-group img {
  max-height: 60px;
  max-width: 150px;
  width: auto;
  object-fit: contain;
}

/* ── 8. FOOTER ───────────────────────────────────────────── */

.footer__social-link {
  background: rgba(255, 255, 255, 0.06);
}

.footer__social-link svg {
  width: 20px !important;
  height: 20px !important;
  display: block !important;
}

@media (max-width: 1024px) {
  .footer__links {
    gap: 12px;
  }

}

@media (max-width: 768px) {
  .footer__inner {
    flex-direction: column;
    gap: 1.25rem;
  }

  .footer__links {
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
  }

  .footer__links a {
    font-size: 0.95rem;
  }

  .footer__social {
    justify-content: center;
  }

  .footer__brand {
    justify-content: center;
  }
}

/* ── 9. FORMULAIRE RESPONSIVE ────────────────────────────── */

.form__row {
  display: flex;
  gap: var(--space-sm);
}

.form__row .form__group {
  flex: 1;
  min-width: 0;
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--space-sm);
}

.form__group input,
.form__group textarea,
.form__group select {
  font-size: 16px;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid;
  width: 100%;
  min-height: 48px;
}

.form__group input:focus,
.form__group textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.form__group textarea {
  resize: vertical;
  min-height: 140px;
  max-height: 400px;
}

@media (max-width: 768px) {
  .form__row {
    flex-direction: column;
  }
}

/* ── 10. CONTACT WRAPPER ─────────────────────────────────── */

.contact__wrap {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-xl);
  align-items: start;
}

@media (max-width: 1024px) {
  .contact__wrap {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
}

/* ── 11. FAQ ACCORDION ───────────────────────────────────── */

.faq__question {
  width: 100%;
  text-align: left;
  padding: 1rem 0;
  font-size: clamp(0.95rem, 1.2vw + 0.4rem, 1.05rem);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
}

.faq__question i {
  transition: transform 0.25s ease;
}

.faq__item.open .faq__question i {
  transform: rotate(180deg);
}

.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 1rem;
}

.faq__item.open .faq__answer {
  max-height: 500px;
  padding: 0 1rem 1rem;
}

/* ── 12. TÉMOIGNAGES ─────────────────────────────────────── */

.testimonials__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
}

@media (max-width: 768px) {
  .testimonials__grid {
    display: flex;
    gap: var(--space-md);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: var(--space-sm);
  }

  .testimonials__grid::-webkit-scrollbar {
    display: none;
  }

  .testimonial__card {
    scroll-snap-align: start;
    flex: 0 0 clamp(280px, 45vw, 480px);
    padding: var(--space-lg);
    border-radius: 12px;
    min-height: 200px;
  }

}

@media (max-width: 480px) {
  .testimonial__card {
    flex: 0 0 calc(100vw - 2 * var(--container-padding));
  }
}

.testimonials-dots {
  display: none;
  justify-content: center;
  gap: 6px;
  margin-top: 1.5rem;
}

@media (max-width: 768px) {
  .testimonials-dots {
    display: flex;
  }
}

.testimonials-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--text, #fff);
  opacity: 0.3;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  min-height: unset;
}

.testimonials-dots .dot.active {
  opacity: 1;
  transform: scale(1.3);
}

/* ── 13. PERFORMANCE KPI CARDS ───────────────────────────── */

.perf__grid {
  grid-template-columns: repeat(4, 1fr);
}

.perf__card {
  text-align: center;
  padding: var(--space-lg) var(--space-md);
  border-radius: 10px;
}

.perf__value {
  font-size: clamp(1.1rem, 2vw + 0.5rem, 1.5rem);
  font-weight: 700;
  line-height: 1;
}

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

@media (max-width: 480px) {
  .perf__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }

  .perf__card {
    padding: var(--space-md) var(--space-sm);
  }
}

/* ── 14. HERO STATS (COUNTERS) ───────────────────────────── */

@media (max-width: 480px) {
  .hero__stats-group {
    gap: var(--space-md);
  }

  .hero__stat {
    min-width: calc(50% - var(--space-md));
  }
}

/* ── 15. IMPRESSION ──────────────────────────────────────── */

@media print {
  .navbar, .back-to-top, .hero__gear, .hero__particles, .loader {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .hero {
    min-height: auto;
    padding: 2rem 0;
  }
}

/* ── 16. UTILITAIRES RESPONSIVE ──────────────────────────── */

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

.container-fluid {
  width: 100%;
  padding: 0 var(--container-padding);
}

.section-padding {
  padding: var(--space-xxl) 0;
}

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.5rem; }
.gap-6 { gap: 2rem; }
.gap-8 { gap: 3rem; }
.gap-10 { gap: 4rem; }

.touch-target {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.no-scroll-chaining {
  overscroll-behavior: contain;
}

.fw-light { font-weight: 300; }
.fw-normal { font-weight: 400; }
.fw-medium { font-weight: 500; }
.fw-semibold { font-weight: 600; }
.fw-bold { font-weight: 700; }

.hide-mobile  { display: block; }
.show-mobile  { display: none; }
.hide-tablet  { display: block; }

@media (max-width: 768px) {
  .hide-mobile { display: none; }
  .show-mobile { display: block; }
}

@media (max-width: 1024px) {
  .hide-tablet { display: none; }
}

@media (max-width: 480px) {
  .text-center-mobile { text-align: center; }
  .mx-auto-mobile { margin-inline: auto; }
}
