/**
 * =========================================================
 * Impact School Africa — responsive.css
 * Breakpoints : laptop / tablet / mobile
 * =========================================================
 */

/* ---------------------------------------------------------
   Laptop (≤ 1199px)
--------------------------------------------------------- */
@media (max-width: 1199px) {
    :root {
        --container: 1000px;
    }

    .hero__title {
        font-size: 2.75rem;
    }

    .about-preview__grid {
        gap: 48px;
    }

    .nav__list {
        gap: 20px;
    }
}

/* ---------------------------------------------------------
   Tablet (≤ 991px)
--------------------------------------------------------- */
@media (max-width: 991px) {
    :root {
        --header-height: 72px;
    }

    /* Menu burger */
    .burger {
        display: flex;
    }

    .nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: var(--color-white);
        box-shadow: var(--shadow-header);
        padding: 20px 24px 28px;
        transform: translateY(-120%);
        opacity: 0;
        visibility: hidden;
        transition: transform var(--transition), opacity var(--transition),
                    visibility var(--transition);
        z-index: 999;
    }

    .nav.is-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav__list {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .nav__link {
        font-size: 1rem;
    }

    .header-actions {
        display: none;
    }

    .nav__actions-mobile {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 24px;
        padding-top: 20px;
        border-top: 1px solid var(--color-border);
    }

    .nav__actions-mobile .btn {
        width: 100%;
    }

    .hero {
        min-height: 80vh;
        padding-bottom: 120px;
    }

    .hero__title {
        font-size: 2.35rem;
    }

    .hero__subtitle {
        font-size: 1rem;
    }

    .statistics {
        margin-top: -70px;
    }

    .statistics__card {
        flex-wrap: wrap;
        padding: 28px 16px;
        gap: 8px;
    }

    .stat-item {
        flex: 1 1 30%;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
        padding: 16px 8px;
    }

    .stat-item:nth-child(4),
    .stat-item:nth-child(5) {
        border-bottom: none;
        flex: 1 1 40%;
    }

    .about-preview {
        padding-top: 70px;
        padding-bottom: 80px;
    }

    .about-preview__grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-preview__media {
        order: -1;
    }

    .about-preview__img {
        aspect-ratio: 16 / 11;
        max-height: 420px;
        margin: 0 auto;
    }

    .footer__top {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .footer__col--brand {
        grid-column: 1 / -1;
    }
}

/* ---------------------------------------------------------
   Mobile large (≤ 767px)
--------------------------------------------------------- */
@media (max-width: 767px) {
    .section {
        padding: 70px 0;
    }

    .section-title {
        font-size: 1.65rem;
    }

    .logo__text {
        font-size: 0.88rem;
    }

    .logo__icon {
        width: 36px;
        height: 36px;
    }

    .hero {
        min-height: 75vh;
        padding-bottom: 100px;
    }

    .hero__title {
        font-size: 1.9rem;
    }

    .hero__subtitle {
        font-size: 0.95rem;
        margin-bottom: 28px;
    }

    .hero__actions {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }

    .hero__actions .btn {
        width: 100%;
    }

    .statistics {
        margin-top: -60px;
    }

    .statistics__card {
        padding: 20px 12px;
    }

    .stat-item {
        flex: 1 1 45%;
    }

    .stat-item:nth-child(5) {
        flex: 1 1 100%;
    }

    .stat-item__number {
        font-size: 1.45rem;
    }

    .stat-item__label {
        font-size: 0.75rem;
    }

    .about-preview {
        padding-top: 56px;
        padding-bottom: 64px;
    }

    .about-preview__text {
        font-size: 0.92rem;
    }

    .footer__top {
        grid-template-columns: 1fr;
        gap: 36px;
        padding-bottom: 40px;
    }

    .footer__bottom-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer__legal {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px 18px;
    }

    .back-to-top {
        right: 16px;
        bottom: 16px;
        width: 42px;
        height: 42px;
    }
}

/* ---------------------------------------------------------
   Mobile petit (≤ 479px)
--------------------------------------------------------- */
@media (max-width: 479px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero__title {
        font-size: 1.65rem;
    }

    .stat-item {
        flex: 1 1 100%;
        border-bottom: 1px solid var(--color-border);
    }

    .stat-item:last-child {
        border-bottom: none;
    }

    .btn--sm {
        padding: 10px 16px;
        font-size: 0.75rem;
    }
}

/* ---------------------------------------------------------
   Pages internes — responsive
--------------------------------------------------------- */
@media (max-width: 1199px) {
    .cards-grid--4 { grid-template-columns: repeat(3, 1fr); }
    .values-grid { grid-template-columns: repeat(2, 1fr); }
    .featured-card { grid-template-columns: 1fr; }
    .featured-card__img { min-height: 240px; max-height: 280px; }
}

@media (max-width: 991px) {
    .page-hero { min-height: 280px; }
    .page-hero__title { font-size: 2.1rem; }

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

    .approach__steps {
        flex-wrap: wrap;
        justify-content: center;
        gap: 28px 16px;
    }

    .approach__steps::before { display: none; }

    .featured-project__grid,
    .about-block__grid,
    .about-block__grid--reverse,
    .detail-layout,
    .contact-grid,
    .donate-grid {
        grid-template-columns: 1fr;
    }

    .about-block__grid--reverse .about-block__media { order: 0; }

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

    .detail-sidebar { position: static; }
    .donate-summary { position: static; }

    .newsletter__form { flex-direction: column; }
    .newsletter__form .btn { width: 100%; }

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

@media (max-width: 767px) {
    .page-hero__title { font-size: 1.75rem; }
    .cards-grid--4,
    .cards-grid--3,
    .cards-grid--2,
    .team-grid,
    .values-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .toolbar { flex-direction: column; align-items: stretch; }
    .toolbar__search { min-width: 0; width: 100%; }

    .form-row { grid-template-columns: 1fr; }
    .form-card { padding: 24px 18px; }

    .cta-banner__title { font-size: 1.45rem; }
    .testimonial-card__text { min-height: 0; }
}
