/* Pépinière Urbaine de Ouagadougou - Responsive Styles */

/* ==========================================================================
   Tablet Breakpoint (max-width: 1200px)
   ========================================================================== */

@media (max-width: 1200px) {
  .header-bar {
    justify-content: space-between;
  }

  .header-bar__toggle {
    display: flex;
  }

  .header-bar__nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--spacing-xs) var(--spacing-md) var(--spacing-md);
    background: rgba(92, 58, 24, 0.96);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px);
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .header-bar--menu-open .header-bar__nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
  }

  .header-bar__link {
    min-height: 48px;
    justify-content: flex-start;
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  }

  .header-bar__link.active {
    border-bottom-color: var(--color-gold);
  }

  /* Reduce chapter content padding */
  .content-block {
    padding: 0 var(--spacing-sm);
  }

  .slide__content {
    padding: var(--spacing-md) 0;
    padding-top: 170px;
    padding-left: 60px;
    padding-bottom: var(--spacing-md);
  }

  .plus-loin__content .plus-loin-section {
    padding: 0 var(--spacing-md);
    padding-bottom: 130px;
  }

  .plus-loin__header {
    padding: var(--spacing-md);
    padding-top: 170px;
    padding-left: 60px;
  }

  /* Stack plus-loin-section image-text layouts to single column */
  .plus-loin-section--image-text {
    flex-direction: column;
    align-items: center;
  }

  .plus-loin-section--image-text .plus-loin-section__image {
    flex: 0 0 auto;
    width: min(100%, 1120px);
    max-width: 1120px;
  }

  .plus-loin-section--image-text .plus-loin-section__content {
    width: min(100%, 1120px);
  }

  /* Adjust testimonial layout */
  .testimonial {
    gap: var(--spacing-md);
  }

  .testimonial__image {
    width: 120px;
    height: 120px;
  }

  /* Reduce portrait size */
  .portrait {
    gap: var(--spacing-md);
  }

  .portrait__image {
    width: 100px;
    height: 100px;
  }

  /* Reduce title sizes */
  .plus-loin__title {
    font-size: 28px;
  }

  .plus-loin-section__title {
    font-size: 20px;
  }

  /* Chapter header on light slides */
  .slide__chapter-title {
    font-size: 20px;
  }

  /* Carousel adjustments */
  .carousel__prev,
  .carousel__next {
    width: 40px;
    height: 40px;
  }

  /* Chapter number box */
  .plus-loin__chapter-num {
    width: 50px;
    height: 50px;
    font-size: 28px;
  }

  /* Home section adjustments */
  .home__content {
    gap: var(--spacing-lg);
    padding: var(--spacing-md);
  }

  .home__title-main {
    font-size: 56px;
  }

  .home__title-accent {
    font-size: 64px;
  }

  /* Carousel slide widths for tablets */
  .carousel__slide {
    flex: 0 0 100%;
    min-width: 100%;
  }
}

/* ==========================================================================
   Mobile Breakpoint (max-width: 768px)
   ========================================================================== */

@media (max-width: 768px) {
  /* Hide side chapter navigation on mobile (fullPage disabled via responsiveWidth) */
  .chapter-nav {
    display: none;
  }

  .header-bar {
    height: 96px;
    padding: 0 var(--spacing-sm);
  }

  .header-bar__logo img {
    height: 52px;
  }

  .header-bar__nav {
    padding: var(--spacing-xs) var(--spacing-sm) var(--spacing-sm);
  }

  /* Home section - stack to single column on mobile */
  .home__content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--spacing-sm);
  }

  .home__title-block {
    align-items: center;
  }

  .home__title {
    align-items: center;
  }

  .home__footer {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }

  .home__title-main {
    font-size: 48px;
  }

  .home__title-accent {
    font-size: 56px;
  }

  .home__subtitle {
    font-size: 18px;
  }

  .home__intro {
    font-size: 14px;
  }

  .home__logo {
    max-width: 120px;
  }

  /* Stack portrait components vertically with centered text */
  .portrait {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .portrait__image {
    width: 90px;
    height: 90px;
    margin-bottom: var(--spacing-sm);
  }

  .portrait__info {
    min-width: 100%;
  }

  .portrait__quote {
    margin-top: var(--spacing-sm);
  }

  /* Hide carousel prev/next buttons (use swipe on mobile) */
  .carousel__prev,
  .carousel__next {
    display: none;
  }

  /* Make carousel dots more touch-friendly */
  .carousel__dot {
    width: 12px;
    height: 12px;
    margin: 0 6px;
  }

  .carousel__dots {
    padding: var(--spacing-sm) 0;
  }

  /* Testimonial stacking */
  .testimonial {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .testimonial__image {
    width: 100px;
    height: 100px;
    margin-bottom: var(--spacing-sm);
  }

  .testimonial__quote {
    border-left: none;
    border-top: 3px solid var(--color-gold);
    padding-left: 0;
    padding-top: var(--spacing-sm);
  }

  .testimonial__quote::before,
  .testimonial__quote::after {
    position: static;
    display: block;
    text-align: center;
    font-size: 40px;
  }

  /* Chapter header on light slides - mobile */
  .slide__chapter-header {
    margin-bottom: var(--spacing-md);
  }

  .slide__chapter-title {
    font-size: 18px;
  }

  /* Plus-loin header adjustments */
  .plus-loin__header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    padding-top: 116px;
  }

  .plus-loin__chapter-num {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }

  .plus-loin__title {
    font-size: 24px;
  }

  /* Content padding adjustments */
  .content-block {
    padding: 0 var(--spacing-xs);
  }

  .slide__content {
    max-width: none;
    padding: var(--spacing-sm);
    padding-top: 116px;
    padding-bottom: var(--spacing-sm);
  }

  .plus-loin__content .plus-loin-section {
    padding: 0 var(--spacing-sm);
    padding-bottom: 110px;
  }

  /* Hide panel carousel arrows on mobile (swipe only) */
  .panel-carousel__prev,
  .panel-carousel__next {
    display: none !important;
  }


  /* Intercalaire images on mobile */
  .intercalaire {
    margin: var(--spacing-sm) 0;
  }

  .plus-loin-section--image-text .plus-loin-section__image img {
    height: clamp(260px, 38vh, 420px);
  }

  /* Section titles */
  .chapter-title {
    font-size: 36px;
  }

  .section-title {
    font-size: 24px;
  }

  .plus-loin-section__title {
    font-size: 18px;
  }

  /* Video player adjustments */
  .video-player video {
    max-height: 50vh;
  }

  /* Credits section mobile */
  .credits__body {
    grid-template-columns: 1fr;
  }

  .credits__header h2 {
    font-size: 32px;
  }

  .credits__postface {
    padding: var(--spacing-sm);
  }

  /* Microprojet cards on mobile */
  .carousel--microprojets .carousel__slide {
    flex: 0 0 100%;
    min-width: 100%;
  }

  /* Tool downloads stacking */
  .tool-downloads {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .tool-download {
    width: 100%;
  }
}
