@media (max-width: 1024px) {
    .carousel__slide {
        min-width: 33.3333%;
    }

    .enbref-flex {
        flex-direction: column;
    }

    .enbref-img {
        min-height: auto;
        padding-top: 0;
        padding-bottom: 0;
    }

    .enbref-content {
        padding: 1rem 1.5rem;
    }

    .enbref-infos {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
        width: 100%;
    }

    .pdg-logo {
        height: 60px;
    }

    .logo {
        margin-top: 0;
    }

    .bilan-circle {
        width: 200px;
        height: 200px;
    }

    /* Force En Bref tiles (mobile grid) on tablet/small desktop */
    .enbref-desktop {
        display: none;
    }

    .enbref-mobile {
        display: block;
        width: 100%;
        max-width: 500px;
    }

    .enbref-mobile-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        align-items: stretch;
        justify-items: stretch;
    }

    .enbref-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 1rem;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        box-sizing: border-box;
        width: 100%;
        aspect-ratio: auto;
        min-height: 140px;
    }

    /* Uniformise l'ordre des éléments : Chiffre en haut, texte en bas */
    .enbref-number {
        font-size: 2.2rem;
        font-weight: 800;
        display: block;
        color: var(--dark-color);
        order: -1;
    }

    .enbref-unit {
        font-size: 1rem;
        color: var(--dark-color);
        display: block;
        text-align: center;
    }

    .section-title-container-enbref {
        text-align: center;
        width: 100%;
        justify-content: center;
        display: flex;
    }
}


@media (max-width: 769px) {
    .header-flex {
        flex-wrap: wrap;
        height: auto;
        padding: 1rem 0;
        position: relative;
    }

    .main-header {
        height: auto;
    }

    .logo {
        order: 1;
    }

    .hamburger {
        display: flex;
        order: 3;
        margin-left: auto;
    }

    .header-actions {
        order: 2;
        gap: 0.5rem;
        position: absolute;
        right: 56px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1002;
    }

    .hamburger {
        display: flex;
        order: 3;
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1003;
    }

    .hamburger[aria-expanded="true"] {
        top: 12px;
        transform: none;
    }

    .hamburger[aria-expanded="true"]~.header-actions {
        top: 12px;
        transform: none;
    }

    .header-actions .btn-contact {
        display: none;
    }

    .main-header .header-actions .social-icon {
        padding: 5px 0;
    }

    .main-nav {
        order: 4;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .main-nav {
        position: relative;
        z-index: 1000;
    }

    .main-nav.active {
        max-height: 500px;
        padding-bottom: 10px;
    }

    .main-nav ul {
        flex-direction: column;
        text-align: center;
        width: 100%;
        gap: 0.5rem;
        padding-top: 1rem;
    }

    .hero-flex {
        flex-direction: column;
        max-height: none;
    }

    .hero-img,
    .hero-content {
        flex: 1 1 100%;
    }

    .hero-img img {
        height: auto;
    }

    .hero-content {
        padding: 0;
    }

    .hero-logo-image {
        height: auto;
    }

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

    .program-mobile {
        display: block;
    }

    .program-desktop {
        display: none;
    }

    .program-columns {
        flex-direction: column;
        align-items: center;
    }

    .program-list {
        max-width: none;
    }

    .program-section {
        padding: 2rem 0;
    }

    .main-footer .container {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .footer-brand {
        display: none;
    }

    .footer-nav,
    .footer-contact {
        text-align: center;
    }

    .footer-nav ul {
        text-align: center;
    }

    .footer-contact .social-media {
        justify-content: center;
    }

    .carousel__btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .carousel__btn--prev {
        left: 4px;
    }

    .carousel__btn--next {
        right: 4px;
    }

    .news-section .carousel__btn--prev,
    #teamCarousel .carousel__btn--prev {
        left: 4px;
    }

    .news-section .carousel__btn--next,
    #teamCarousel .carousel__btn--next {
        right: 4px;
    }
}


@media (max-width: 769px) {
    .contact-page .grid {
        display: block;
    }

    .contact-page .contact-content {
        margin-bottom: 1.25rem;
    }

    .contact-page .contact-info h2 {
        font-size: 1.1rem;
    }

    .contact-page .social-media-large {
        display: flex;
        flex-direction: row;
        gap: 1rem;
        align-items: center;
    }

    .contact-page .social-media-large .social-link img {
        width: 36px;
        height: 36px;
        display: inline-block;
    }

    .contact-page blockquote.instagram-media,
    .contact-page .instagram-media {
        max-width: 100% !important;
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }
}

@media (max-width: 600px) {
    .carousel__slide {
        min-width: 100%;
    }

    .team .carousel__slide {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .team .team-member {
        width: 100%;
        max-width: 280px;
    }

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

    .head-of-list-image {
        width: 200px;
        height: 200px;
        margin-bottom: 2rem;;
    }

    .head-of-list {
        align-items: center;
        text-align: center;
    }

    .hero-jours {
        font-size: 2rem;
    }

    .hero-dates {
        font-size: 1rem;
    }

    .slogan-box {
        font-size: 1.1rem;
        padding: 0.4em 1.2em;
    }

    .hero-logo {
        font-size: 1.8rem;
    }

    .en-bref {
        padding: 0;
    }

    section {
        padding: 0;
    }

    .bilan-circle {
        width: 240px;
        height: 240px;
    }

    .team {
        padding: 1rem 0 1.5rem 0;
    }

    .news-section {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
}


@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .button {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .logo {
        font-size: 1.8rem;
    }

    .btn-contact {
        font-size: 0.9rem;
        padding: 0.4em 1.2em;
    }
}


@media (max-width: 769px) {
    .hero-logo {
        height: auto;
    }

    .hero-logo-image {
        max-height: none;
        height: 140px;
    }
}

@media (max-width: 480px) {
    .hero-logo-image {
        height: 250px;
    }
}

@media (max-width: 769px) {
    .main-footer .hero-logo-image {
        display: none;
    }
}

@media (max-width: 480px) {
    .main-footer .hero-logo-image {
        height: 140px;
    }
}


@media (max-width: 769px) {
    .bilan-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .bilan-item {
        padding: 1.5rem;
    }

    .bilan-section {
        /* padding-top: 3rem; */
        padding-bottom: 1rem;
        min-height: 1vh;
    }

    .bilan-intro {
        margin-bottom: 2rem;
    }

    .bilan-pdf-section {
        padding: 2rem 1rem;
        margin-top: 3rem;
    }
}

@media (max-width: 480px) {
    .bilan-section h1 {
        font-size: 1.8rem;
    }

    .bilan-section h2 {
        font-size: 1.5rem;
    }

    .bilan-item h3 {
        font-size: 1.3rem;
    }

    .bilan-intro p {
        font-size: 1rem;
    }
}


@media (min-width: 769px) {
    .program-mobile {
        display: none;
    }

    .program-desktop {
        display: block;
    }
}


@media (min-width: 769px) and (max-width: 1024px) {
    .program-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 769px) {
    .main-header .logo a {
        display: inline-flex;
        align-items: flex-end;
        gap: 0.2rem;
    }

    .main-header .logo img {
        padding: 0 0 !important;
        margin-top: 0 !important;
        vertical-align: bottom;
        display: inline-block;
        width: auto;
    }
}
/* Layout spécifique pour les pictos bilan entre 480px et 1024px */
@media (min-width: 481px) and (max-width: 1024px) {
    .bilan-column {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
        justify-items: center;
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 992px) {
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .team-grid {
        grid-template-columns: 1fr;
    }
}
