/* ===================================================================
   OPTIMISATION GLOBALE POUR IPAD ET TABLETTES (768px - 1024px)
   =================================================================== */

/* ===== BASE iPad ===== */
@media (min-width: 521px) and (max-width: 1024px) {

    /* ===== CONTAINER PRINCIPAL ===== */
    .container {
        width: min(90%, var(--container));
        padding: 0 20px;
    }

    /* ===== SECTIONS ===== */
    .section {
        padding: 60px 0;
    }

    .section h2 {
        font-size: 36px;
        line-height: 1.2;
        margin-bottom: 30px;
    }

    .section p {
        font-size: 15px;
        line-height: 1.6;
    }

    /* ===== GRID ADAPTATIONS ===== */
    .grid {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    /* ===== BOUTONS ===== */
    .btn {
        font-size: 14px;
        padding: 10px 16px;
    }

    /* ===== IMAGES ===== */
    img {
        max-width: 100%;
        height: auto;
    }

    /* ===== VIDÉOS RESPONSIVE ===== */
    video {
        max-width: 100%;
        height: auto;
    }

    /* ===== ESPACEMENT ADAPTÉ ===== */
    .section.placeholder {
        padding: 50px 0;
    }

    /* ===== HERO ===== */
    .hero {
        min-height: 85vh;
    }

    /* ===== MODALES ===== */
    .modal {
        width: 90%;
        max-width: 500px;
    }

    /* ===== FLEXBOX / GRID RESPONSIVE ===== */
    [class*="flex-"],
    [class*="grid-"] {
        flex-direction: column !important;
    }

    /* ===== TEXTES LONGS ===== */
    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* ===== ÉVITER LE DÉBORDEMENT HORIZONTAL ===== */
    body,
    html {
        overflow-x: hidden;
    }

    /* ===== ESPACEMENT RESPONSIF ===== */
    .mt-large {
        margin-top: 30px !important;
    }

    .mb-large {
        margin-bottom: 30px !important;
    }

    .p-large {
        padding: 30px !important;
    }

}

/* ===== iPad Portrait (max-width: 768px) ===== */
@media (max-width: 768px) {

    .container {
        width: min(100%, var(--container));
        padding: 0 16px;
    }

    .section {
        padding: 50px 0;
    }

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

    .section p {
        font-size: 14px;
    }

}

/* ===== iPad Landscape (769px - 1024px) ===== */
@media (min-width: 769px) and (max-width: 1024px) {

    .container {
        width: min(100%, var(--container));
    }

    .section {
        padding: 70px 9px;
    }

    .section h2 {
        font-size: 38px;
    }

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

}

/* ===== Éviter le zoom involontaire sur les inputs (iPad) ===== */
@media (max-width: 1024px) {

    input,
    textarea,
    select {
        font-size: 16px;
        /* Empêche le zoom automatique sur activation */
    }

    /* ===== AMÉLIORER LES BOUTONS TACTILES ===== */
    .btn,
    button,
    a[class*="btn"] {
        min-height: 44px;
        /* Norme d'accessibilité tactile */
        min-width: 44px;
    }

    /* ===== ESPACES POUR TOUCHES TACTILES ===== */
    a,
    button {
        padding: 12px 16px;
    }

    /* ===== FOOTER ADAPTÉ ===== */
    footer {
        padding: 40px 0;
    }

    footer nav {
        flex-direction: column;
        gap: 20px;
    }

    /* ===== LIENS TACTILES ===== */
    a {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
    }

    .product-showcase {
        position: relative;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: unset !important;
        align-items: center;
        /* padding: clamp(40px, 8vw, 80px); */
        border-radius: 12px;
        min-height: 554px;
        overflow: hidden;
    }

    /* ===== OPTIMISATION CARTES ENGAGEMENTS POUR IPAD ===== */
    .engagement-card {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        padding: 20px !important;
        gap: 16px !important;
    }

    .engagement-card .card-content {
        width: 100% !important;
        height: auto !important;
    }

    .engagement-card .card-title {
        font-size: 20px !important;
    }

    .engagement-card .card-text {
        font-size: 13px !important;
        line-height: 1.5 !important;
    }

    @media (min-width: 768px) and (max-width: 1023px) {
        .engagements-grid {
            grid-template-columns: repeat(2, 1fr) !important;
            gap: 20px !important;
        }

        .engagement-card {
            max-width: 100% !important;
            height: auto !important;
        }
    }

    @media (max-width: 767px) {
        .engagement-card {
            width: 100% !important;
            max-width: none !important;
            height: auto !important;
        }
    }
}