/* ============================================================
   GROUPE CHEDJOU — Responsive
   320px → 1920px
   ============================================================ */

/* ══════════════════════════════════════════════
   LARGE DESKTOP — ≥ 1440px
══════════════════════════════════════════════ */
@media (min-width: 1440px) {
  .stats-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  }

  .project-item:nth-child(1) { grid-column: span 8; }
  .project-item:nth-child(2) { grid-column: span 4; }
  .project-item:nth-child(3) { grid-column: span 4; }
}

/* ══════════════════════════════════════════════
   DESKTOP — ≤ 1200px
══════════════════════════════════════════════ */
@media (max-width: 1200px) {
  :root {
    --section-px: clamp(1.25rem, 4vw, 4rem);
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
  }

  .stat-item:nth-child(2n)::after { display: none; }
  .stat-item:nth-child(1)::after,
  .stat-item:nth-child(3)::after {
    display: block;
    right: auto;
    left: 0;
    top: auto;
    bottom: 0;
    height: 1px;
    width: 100%;
  }

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

  .services-grid .service-card:nth-child(1) {
    grid-column: span 2;
  }

  .services-grid .service-card:nth-child(2),
  .services-grid .service-card:nth-child(3) {
    grid-column: span 1;
  }

  .services-grid .service-card:nth-child(4),
  .services-grid .service-card:nth-child(5),
  .services-grid .service-card:nth-child(6),
  .services-grid .service-card:nth-child(7) {
    grid-column: span 1;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-10);
  }
}

/* ══════════════════════════════════════════════
   TABLET LARGE — ≤ 1024px : nav compressée, pas encore de burger
══════════════════════════════════════════════ */
@media (max-width: 1024px) {
  /* Header */
  .header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  /* Nav compressée — reste visible */
  .nav-main {
    gap: clamp(0.6rem, 1.4vw, 1.2rem);
  }
  .nav-link {
    font-size: 0.65rem;
  }
  /* Bouton contact réduit */
  .header-actions .btn {
    font-size: 0.6rem;
    padding: 8px 14px;
  }
}

/* ══════════════════════════════════════════════
   TABLET — ≤ 860px : burger actif, nav masquée
══════════════════════════════════════════════ */
@media (max-width: 860px) {
  /* Header — flex space-between */
  .header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .nav-main { display: none; }
  .burger { display: flex; }
  .header-actions .btn { display: none; }

  /* Hero */
  .hero__content {
    grid-template-columns: 1fr;
  }

  /* About */
  .about-layout {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }

  .about-badge {
    right: 0;
    bottom: -1.5rem;
  }

  /* Map */
  .map-layout {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  .africa-map-container {
    min-height: 360px;
  }

  /* Why */
  .why-layout {
    grid-template-columns: 1fr;
  }

  .why-img {
    min-height: 360px;
  }

  /* Contact */
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .contact-info-panel {
    height: auto;
  }

  /* Projects */
  .projects-grid {
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 220px;
  }

  .project-item:nth-child(1) { grid-column: span 6; grid-row: span 2; }
  .project-item:nth-child(2) { grid-column: span 3; }
  .project-item:nth-child(3) { grid-column: span 3; }
  .project-item:nth-child(4) { grid-column: span 2; }
  .project-item:nth-child(5) { grid-column: span 2; }
  .project-item:nth-child(6) { grid-column: span 2; }

  /* Process — switch to vertical */
  .process-timeline {
    flex-direction: column;
    gap: var(--space-10);
    align-items: flex-start;
  }

  .process-timeline::before {
    top: 0;
    bottom: 0;
    left: 26px;
    right: auto;
    width: 2px;
    height: auto;
    transform: none;
  }

  .process-step {
    flex-direction: row !important;
    align-items: flex-start;
    text-align: left;
    padding: 0 0 0 var(--space-8) !important;
    gap: var(--space-5);
    width: 100%;
  }

  .process-step__watermark { display: none; }

  .process-step__title {
    max-width: none;
    margin-top: var(--space-2) !important;
    margin-bottom: 0 !important;
  }
}

/* ══════════════════════════════════════════════
   MOBILE LARGE — ≤ 768px
══════════════════════════════════════════════ */
@media (max-width: 768px) {
  :root {
    --section-py: clamp(3rem, 8vw, 5rem);
    --section-px: 1.25rem;
    --header-h:   64px;
  }

  /* Logo */
  .logo-full { height: 44px; }
  .logo { padding: 3px 6px; border-radius: 7px; }

  /* Hero */
  .hero__title {
    font-size: clamp(2.4rem, 10vw, 4rem);
  }

  .hero__ctas {
    flex-direction: column;
  }

  .hero__ctas .btn {
    text-align: center;
    justify-content: center;
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stat-item::after { display: none !important; }

  .section-stats,
  .section-map {
    clip-path: none;
  }

  /* Services */
  .services-grid {
    grid-template-columns: 1fr;
  }

  .services-grid .service-card,
  .services-grid .service-card:nth-child(1),
  .services-grid .service-card:nth-child(2),
  .services-grid .service-card:nth-child(3) {
    grid-column: span 1;
    min-height: 280px;
  }

  /* Projects */
  .projects-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 260px;
  }

  .project-item,
  .project-item:nth-child(n) {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }

  .projects-title-bg { display: none; }

  /* News */
  .news-grid {
    grid-template-columns: 1fr;
  }

  .news-featured {
    grid-column: span 1;
    grid-template-columns: 1fr;
  }

  .news-featured__img {
    min-height: 220px;
  }

  /* About */
  .about-text {
    padding-left: var(--space-5);
  }

  .about-values {
    grid-template-columns: 1fr;
  }

  .about-badge {
    position: static;
    margin-top: var(--space-5);
    display: inline-block;
  }

  /* Contact */
  .form-row {
    grid-template-columns: 1fr;
  }

  .contact-title {
    font-size: clamp(2.5rem, 10vw, 4.5rem);
  }

  /* Testimonials */
  .testimonials-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-6);
  }

  .testimonial-card {
    padding: var(--space-6);
  }

  .testimonial-card__quote {
    font-size: var(--text-xl);
  }

  /* Process */
  .process-timeline { padding-bottom: 0; }

  /* Footer */
  .footer-top {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ══════════════════════════════════════════════
   MOBILE SMALL — ≤ 480px
══════════════════════════════════════════════ */
@media (max-width: 480px) {
  :root {
    --section-px: 1rem;
  }

  /* Logo */
  .logo-full { height: 36px; }
  .logo { padding: 3px 5px; }

  .hero__title {
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .hero__subtitle {
    font-size: var(--text-base);
  }

  /* CTA côte à côte sur très petit écran (375px et moins) */
  .hero__ctas {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-3);
  }

  .hero__ctas .btn {
    flex: 1 1 calc(50% - var(--space-3) / 2);
    min-width: 0;
    white-space: normal;
    padding: 0.85em 0.6em;
    font-size: 0.58rem;
    line-height: 1.3;
    letter-spacing: 0.04em;
    text-align: center;
    justify-content: center;
  }

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

  .testimonial-card {
    padding: var(--space-5);
  }

  .section-label {
    font-size: 0.6rem;
  }

  .filter-pills {
    gap: var(--space-2);
  }

  .filter-pill {
    padding: 0.5em 1.1em;
  }

  .contact-map {
    height: 260px;
  }

  .section-header {
    margin-bottom: var(--space-8);
  }
}

/* ══════════════════════════════════════════════
   ULTRA WIDE — ≥ 1920px
══════════════════════════════════════════════ */
@media (min-width: 1920px) {
  :root {
    --section-px: 8rem;
  }

  .container {
    padding-inline: var(--space-32);
  }
}

/* ══════════════════════════════════════════════
   REDUCED MOTION
══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .partners-track { animation: none; }
  .scroll-indicator { animation: none; }
  .hero__bg { transform: none !important; }

  .mobile-nav .nav-link,
  .mobile-nav-footer {
    transition-delay: 0ms !important;
  }
}

/* ══════════════════════════════════════════════
   PRINT
══════════════════════════════════════════════ */
@media print {
  .site-header,
  .mobile-nav,
  .scroll-indicator,
  .section-stats,
  .section-map,
  .section-testimonials { display: none; }

  body { font-size: 12pt; color: #000; }
  a::after { content: ' (' attr(href) ')'; }
}
