/* Medical Center Nemi — responsive global, toutes les pages */
html,
body {
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Les bandes occupent toute la fenêtre ; leurs enfants restent centrés. */
.nemi-header,
.nemi-content-section,
.nemi-emergency-strip,
.nemi-footer-wrap {
  width: 100%;
  max-width: none;
}

.nemi-header__inner,
.nemi-emergency-strip__inner,
.nemi-footer,
.nemi-hero,
.nemi-home-hero,
.nemi-content-heading,
.nemi-details,
.nemi-services-grid,
.nemi-gallery,
.nemi-gallery-pagination,
.nemi-promoters__grid,
.nemi-contact-form-wrap,
.nemi-contact-grid,
.nemi-ebanga-map,
.nemi-reasons,
.nemi-practical-grid,
.nemi-practical-guidance,
.nemi-lab-note {
  width: 100%;
  max-width: var(--nemi-container);
  margin-inline: auto;
  min-width: 0;
}

.nemi-header__inner {
  padding-inline: clamp(16px, 3vw, 32px);
}

.nemi-hero,
.nemi-home-hero {
  padding-inline: clamp(16px, 3vw, 32px);
}

.nemi-footer {
  padding-inline: clamp(16px, 3vw, 32px);
}

/* Prevent intrinsic image/text widths from forcing a desktop overflow. */
.nemi-hero > *,
.nemi-home-hero > *,
.nemi-content-section > *,
.nemi-contact-grid > *,
.nemi-ebanga-map > *,
.nemi-reasons__grid > *,
.nemi-practical-grid > *,
.nemi-practical-guidance > *,
.nemi-services-grid > *,
.nemi-details > *,
.nemi-gallery > *,
.nemi-promoters__grid > * {
  min-width: 0;
  max-width: 100%;
}

.nemi-hero__media,
.nemi-hero__media.nemi-hero-carousel,
.nemi-mini-carousel,
.nemi-mini-carousel__frame,
.nemi-gallery-item {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

img,
video,
iframe {
  max-width: 100%;
}

.nemi-hero__media img,
.nemi-hero-carousel__slide img,
.nemi-mini-carousel__slide img,
.nemi-location-photo img {
  max-width: 100%;
}

.nemi-footer-wrap {
  margin-top: auto;
}

@media (min-width: 900px) {
  .nemi-menu-toggle { display: none; }
  .nemi-nav { display: flex; }

  .nemi-hero__content,
  .nemi-hero__media {
    min-width: 0;
  }
}

@media (min-width: 1024px) {
  .nemi-hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }
}

/* Tablette et petits écrans desktop : conserver une navigation aérée. */
@media (min-width: 900px) and (max-width: 1199px) {
  .nemi-header__inner { padding-inline: 20px; }
  .nemi-nav { gap: clamp(10px, 1.6vw, 20px); }
  .nemi-nav a { font-size: 0.88rem; }
  .nemi-header__actions { gap: 8px; }
  .nemi-btn-emergency { padding-inline: 14px; }
}

@media (max-width: 899px) {
  .nemi-nav { display: none; }
  .nemi-menu-toggle { display: inline-flex; }

  .nemi-hero,
  .nemi-home-hero {
    padding-block: 32px;
  }

  .nemi-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .nemi-hero__media,
  .nemi-hero__media.nemi-hero-carousel {
    width: 100%;
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 760px) {
  .nemi-details,
  .nemi-services-grid,
  .nemi-quicklinks,
  .nemi-specialty-grid,
  .nemi-reasons__grid,
  .nemi-practical-grid,
  .nemi-practical-guidance,
  .nemi-contact-grid,
  .nemi-ebanga-map,
  .nemi-promoters__grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .nemi-hero__media,
  .nemi-hero__media.nemi-hero-carousel {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 640px) {
  .nemi-header__inner,
  .nemi-footer,
  .nemi-home-hero,
  .nemi-hero {
    padding-inline: 16px;
  }

  .nemi-home-hero h1 {
    overflow-wrap: anywhere;
  }

  .nemi-welcome-badge__title {
    white-space: normal;
  }
}

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