/* ============================================================
   EDUCOJEUX - Améliorations mobile / tactile (transverse)
   ============================================================ */

/* --- Tailles tactiles minimales (WCAG 2.1) sur les actions critiques --- */
@media (max-width: 768px) {
    .woocommerce a.button,
    .woocommerce button.button,
    .woocommerce input.button,
    .woocommerce-page a.button,
    .woocommerce-page button.button,
    .button.ej-btn-outline,
    .educojeux-quote-cta__btn,
    .educojeux-thankyou-pdf__btn,
    .educojeux-ms-add-btn,
    .educojeux-etab-chip,
    .educojeux-sirene-chip {
        min-height: 44px;
        line-height: 1.25;
        padding-top: 11px;
        padding-bottom: 11px;
    }

    /* Champs formulaire : taille texte ≥ 16px pour éviter le zoom Safari iOS */
    .woocommerce form .form-row input.input-text,
    .woocommerce form .form-row textarea,
    .woocommerce form .form-row select,
    .educojeux-ms-field input,
    .educojeux-ms-ventil__qty input {
        font-size: 16px;
    }

    /* Espace pour la barre support fixe en bas (≈ 70px) */
    body {
        padding-bottom: 80px;
    }

    /* Sur mobile, le widget trust footer-signal est masqué (déjà géré dans trust.css) */
}

/* --- Bouton "Retour en haut" --- */
.educojeux-back-to-top {
    position: fixed;
    bottom: 90px;
    left: 16px;
    z-index: 9996;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(0, 0, 145, 0.86);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
    transition: all 0.18s ease;
}

.educojeux-back-to-top:hover {
    background: #000091;
    transform: translateY(-2px);
}

@media (min-width: 769px) {
    .educojeux-back-to-top {
        bottom: 90px;
        left: 22px;
    }
}

/* --- Améliorations catalogue mobile --- */
@media (max-width: 768px) {
    /* Filtres établissement : scroll horizontal au lieu de wrap (chips plus accessibles) */
    .educojeux-etab-selector__chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        padding-bottom: 4px;
    }
    .educojeux-etab-chip {
        flex-shrink: 0;
    }
}

/* --- Améliorations checkout mobile --- */
@media (max-width: 640px) {
    /* Le bloc multi-livraison prend plus de place : padding réduit */
    .educojeux-ms-panel {
        padding: 14px;
    }

    /* Le bandeau SIRENE filtre CP doit rester lisible */
    .educojeux-sirene-cp-info {
        font-size: 0.78rem;
    }
}

/* --- Tap-highlight discret --- */
a, button {
    -webkit-tap-highlight-color: rgba(0, 0, 145, 0.12);
}

/* --- Focus visible cohérent pour accessibilité clavier --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #000091;
    outline-offset: 2px;
    border-radius: 2px;
}
