/* ==========================================================================
   Responsive — la maquette est la référence à 1440 px ; on dégrade proprement
   pour 1366, 1024, 768, 480 et 375 px. Au-delà de 1440 px, le contenu reste centré.
   ========================================================================== */

/* Empêche le scroll horizontal global causé par les marges négatives et animations */
html, body { overflow-x: hidden; }

@media (max-width: 1380px) {
  :root { --gutter: 40px; }
  .main-nav__list { gap: 22px; }
  .container--sites { padding-inline: 40px; }
}

@media (max-width: 1260px) {
  .stats__collage { transform: scale(.75); }
  .stats__collage--left { transform-origin: top left; }
  .stats__collage--right { transform-origin: top right; }
  .main-nav__list { gap: 16px; }
  .main-nav__list a { font-size: 12px; }
  .site-header__cta { width: auto; padding: 0 18px; }

  .map-layout { grid-template-columns: 1fr; padding-right: var(--gutter); row-gap: 32px; }
  .map-layout__text { padding-top: 0; max-width: 640px; }
  .niger-map { width: 100%; max-width: 744px; margin-inline: auto; }

  .site-footer__top { grid-template-columns: 1.4fr 1fr 1fr auto; gap: 32px; }
}

/* ---------- Menu mobile ---------- */
@media (max-width: 1100px) {
  :root { --header-h: 76px; }
  .site-logo img { width: 116px; }
  .site-header__cta { display: none; }

  .nav-toggle {
    position: relative;
    z-index: 120;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 0 10px;
    border-radius: var(--radius-md);
  }
  .nav-toggle__bar {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: var(--c-green-dark);
    transition: transform .3s var(--ease), opacity .2s;
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .main-nav {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 110;
    flex-direction: column;
    justify-content: flex-start;
    gap: 28px;
    width: min(380px, 100%);
    padding: calc(var(--header-h) + 16px) 28px 32px;
    background: var(--c-white);
    box-shadow: -20px 0 60px rgba(4, 53, 31, .18);
    overflow-y: auto;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .35s var(--ease), visibility 0s linear .35s;
  }
  .main-nav.is-open {
    transform: none;
    visibility: visible;
    transition: transform .35s var(--ease);
  }
  .main-nav__list { flex-direction: column; gap: 0; }
  .main-nav__list li + li { border-top: 1px solid #eeeeea; }
  .main-nav__list a { padding: 16px 0; font-size: 15px; }
  .main-nav__list a::after { display: none; }
  .main-nav .main-nav__cta { display: inline-flex; height: 48px; }
  body.nav-open { overflow: hidden; }
  body.nav-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 105;
    background: rgba(4, 20, 12, .45);
  }
  .site-header { z-index: 115; }
}

@media (max-width: 1024px) {
  .hero__title { font-size: 44px; line-height: 1.3; }

  .theme-card { grid-template-columns: 1fr 1fr; }
  .theme-card__body { padding: 40px 36px; }

  .circuit-search { flex-wrap: wrap; padding: 24px; }
  .circuit-search__fields { flex-wrap: wrap; gap: 20px 32px; }

  .reasons-grid,
  .reasons-grid--page { grid-template-columns: repeat(3, 1fr); padding: 0; }
  .sites-grid,
  .dish-grid,
  .cards-grid--4 { grid-template-columns: repeat(3, 1fr); }
  .stats__list { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .stat:nth-child(odd) { border-left: 0; }
  .stats__collage { display: none; }
  .stats .section-head { padding-top: 0; }
  .stats__highlight { margin-top: 40px; }
  .events-grid { grid-template-columns: repeat(2, 1fr); padding: 0; }
  .info-grid { grid-template-columns: repeat(2, 1fr); padding: 0; }
  .news-grid { grid-template-columns: repeat(2, 1fr); padding: 0; }
  .testimonials-grid { grid-template-columns: repeat(2, 1fr); padding: 0; }
  .cards-grid--3 { grid-template-columns: repeat(2, 1fr); }


  .partners-bubbles__track { gap: 28px; }

  .newsletter__inner { flex-direction: column; align-items: flex-start; justify-content: center; padding-block: 48px; }
  .newsletter__form { width: 100%; max-width: 520px; margin-top: 0; }

  .site-footer__top { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .site-footer__brand { grid-column: 1 / -1; }

  .detail-layout { grid-template-columns: 1fr; gap: 40px; }
  .detail-layout__aside { position: static; }
  .page-hero__title { font-size: 36px; }
}

@media (max-width: 768px) {
  :root { --gutter: 24px; }
  .container--sites { padding-inline: var(--gutter); }

  .topbar__contact a[href^="tel:"] { display: none; }

  .section--presentation,
  .section--reasons,
  .section--sites,
  .section--events,
  .section--practical,
  .section--news,
  .section--testimonials { padding: 56px 0; }
  .section--map { padding: 48px 0; }
  .section-title,
  .section-title--xl,
  .section-title--md { font-size: 24px; }
  .section-intro { margin-top: 16px; font-size: 15px; line-height: 22px; }
  .section--presentation .section-head .eyebrow { margin-bottom: 13px; }

  .hero__inner { padding-bottom: 48px; }
  .hero__media-label { left: var(--gutter); max-width: calc(100% - 2 * var(--gutter)); }
  .hero__title { font-size: 34px; }
  .hero__text { font-size: 16px; line-height: 23px; }

  .pills--center { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scrollbar-width: none; }
  .pills--center::-webkit-scrollbar { display: none; }
  .pill { flex: none; }

  .theme-card { grid-template-columns: 1fr; }
  .theme-card__media { height: 260px; }
  .theme-card__body { padding: 28px 24px 32px; }

  .circuit-search { flex-direction: column; align-items: stretch; }
  .circuit-search__fields { flex-direction: column; gap: 16px; }
  .circuit-search__select { width: 100% !important; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .2); }
  .circuit-search__submit { width: 100%; }

  .reasons-grid,
  .reasons-grid--page { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .sites-grid,
  .dish-grid,
  .cards-grid--4,
  .cards-grid--3 { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .food-row__list > li { width: 260px; }
  .food-row--reverse { margin-left: -120px; }
  .section-head--split { flex-direction: column; align-items: flex-start; gap: 12px; }
  .section-head--split > .link-arrow { margin-bottom: 0; order: 2; }
  .events-grid,
  .news-grid { grid-template-columns: repeat(2, 1fr); margin-top: 24px; gap: 16px; }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: 1fr; }

  .film__media { aspect-ratio: 16 / 9; border-radius: var(--radius-xl); }
  .film__play { width: 64px; height: 64px; }
  .film__footer { flex-direction: column; align-items: flex-start; margin-top: 24px; padding-bottom: 24px; gap: 16px; }
  .film__title { font-size: 22px; line-height: 1.35; }
  .film__more { align-self: flex-start; }

  .partners-bubbles__track { gap: 24px; margin-top: 36px; align-items: center; }
  .partner-bubble,
  .partner-bubble:nth-child(1),
  .partner-bubble:nth-child(2),
  .partner-bubble:nth-child(3),
  .partner-bubble:nth-child(4),
  .partner-bubble:nth-child(5) { width: 140px; height: 140px; padding: 20px; margin-bottom: 0; }

  .site-footer__bottom-inner { flex-direction: column; align-items: flex-start; gap: 14px; padding-block: 24px; }
  .site-footer__legal { flex-wrap: wrap; gap: 8px 20px; }
  .social { margin-left: 0; }

  .page-hero { min-height: 260px; }
  .page-hero--image { min-height: 320px; }
  .page-hero__inner { padding-bottom: 40px; }
  .page-hero__title { font-size: 28px; }
  .page-hero__intro { font-size: 16px; line-height: 24px; }
  .page-section { padding: 44px 0 56px; }
  .form-row { grid-template-columns: 1fr; }
  .contact-form { padding: 20px; }

  .stats__highlight { margin-top: 60px; }
  .stats__big-label { font-size: 16px; }
}

@media (max-width: 480px) {
  :root { --gutter: 16px; }

  .topbar { font-size: 11px; }
  .topbar__contact { display: none; }
  .topbar__inner { justify-content: flex-end; height: 36px; }

  .hero__title { font-size: 28px; line-height: 1.3; }
  .hero__text { font-size: 15px; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; min-width: 0; }
  .hero__media-label { top: 20px; font-size: 11px; }

  .section--presentation,
  .section--reasons,
  .section--sites,
  .section--events,
  .section--practical,
  .section--news,
  .section--testimonials { padding: 48px 0; }
  .section--map { padding: 40px 0; }
  .section-title,
  .section-title--xl,
  .section-title--md { font-size: 22px; }

  .reasons-grid,
  .reasons-grid--page,
  .sites-grid,
  .dish-grid,
  .cards-grid--4,
  .cards-grid--3,
  .events-grid,
  .info-grid,
  .news-grid { grid-template-columns: 1fr; }

  .niger-map .polaroid { width: 24%; }

  .stats { padding: 56px 0 48px; }
  .stats__highlight { margin-top: 40px; }
  .stats__list { grid-template-columns: 1fr; row-gap: 28px; }
  .stat { justify-content: flex-start; }
  .stat + .stat { border-left: 0; }
  .stat__value { font-size: 38px; }

  /* Réinitialise le décalage de la 2e rangée gastronomie sur petits écrans */
  .food-row--reverse { margin-left: 0; }

  /* Film de destination */
  .film__title { font-size: 20px; }
  .film__media { border-radius: var(--radius-lg); }

  .partners-bubbles__track { gap: 16px; margin-top: 28px; align-items: center; }
  .partner-bubble,
  .partner-bubble:nth-child(1),
  .partner-bubble:nth-child(2),
  .partner-bubble:nth-child(3),
  .partner-bubble:nth-child(4),
  .partner-bubble:nth-child(5) { width: 110px; height: 110px; padding: 14px; margin-bottom: 0; }

  .newsletter__inner { padding-block: 36px; }
  .newsletter__title { font-size: 22px; }
  .newsletter__form { flex-direction: column; }
  .newsletter__input { flex: none; width: 100%; }
  .newsletter__submit { width: 100%; }
  .newsletter__message { position: static; }

  .site-footer__top { grid-template-columns: 1fr; }

  .page-hero { min-height: 240px; }
  .page-hero__inner { padding-bottom: 36px; }
  .page-hero__title { font-size: 24px; }
  .page-hero__intro { font-size: 15px; line-height: 22px; }
  .page-section { padding: 36px 0 48px; }
  .filters { padding: 16px; }
  .filters__field { flex-basis: 100%; }
  .filters__submit { width: 100%; }
  .facts > div { flex-direction: column; gap: 4px; }
  .facts dd { text-align: left; }
  .gallery { grid-template-columns: 1fr; }
}

/* ---------- Très petits écrans (375 px) ---------- */
@media (max-width: 390px) {
  :root { --gutter: 14px; }

  .hero__title { font-size: 26px; }
  .site-logo img { width: 100px; }

  .section-title,
  .section-title--xl,
  .section-title--md { font-size: 20px; }

  .btn--lg { height: 46px; font-size: 14px; padding: 0 20px; }
  .btn--lg.btn--primary { min-width: 0; width: 100%; }

  .pill { height: 36px; padding: 0 16px; font-size: 12px; }

  .circuit-search { padding: 16px; }
  .circuit-search__submit { width: 100%; }

  .film__play { width: 52px; height: 52px; }
  .film__play svg { width: 22px; height: 22px; }

  .newsletter__title { font-size: 20px; }

  .page-hero__title { font-size: 22px; }
}
