/**
 * Formations & E-books — Pas de scroll horizontal (mobile + PC)
 * Style uniforme pour toutes les formations et ebooks.
 */

/* Empêcher tout défilement horizontal de la page */
.formations-mobile-root {
    overflow-x: hidden;
    max-width: 100%;
    box-sizing: border-box;
}
.formations-mobile-root * {
    box-sizing: border-box;
}

/* Couvertures : jamais plus large que la fenêtre (tous viewports) */
.formations-mobile-root .formation-cover {
    max-width: 100% !important;
    width: 100%;
    overflow-x: hidden;
}
.formations-mobile-root .formation-cover .formation-cover-inner {
    min-width: 0;
    overflow-wrap: break-word;
}

/* Pages A4 (guides) : ne jamais dépasser la largeur disponible (PC inclus) */
.formations-mobile-root .a4-page {
    max-width: 100% !important;
}

/* Blocs de contenu type ebook : padding réduit sur mobile */
@media screen and (max-width: 767px) {
    .formations-mobile-root .formation-content-block {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        padding-top: 1.25rem !important;
        padding-bottom: 1.25rem !important;
    }
    .formations-mobile-root .formation-content-block.mt-8 {
        margin-top: 0.5rem !important;
    }
    /* Couverture : hauteur et cadre intérieur (ebook + guides) */
    .formations-mobile-root .formation-cover.min-h-\[1123px\] {
        min-height: 60vh;
    }
    .formations-mobile-root .formation-cover-inner {
        margin: 0.5rem !important;
        padding: 1rem !important;
        border-width: 8px !important;
    }
    .formations-mobile-root .border-\[12px\].m-6 {
        margin: 0.5rem !important;
        padding: 1rem !important;
        border-width: 8px !important;
    }
    .formations-mobile-root .p-12.md\:p-16 {
        padding: 1rem !important;
    }
}

/* Tables : défilement interne uniquement, ne pas élargir la page */
.formations-mobile-root .overflow-x-auto {
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}
.formations-mobile-root table {
    min-width: 0;
}
@media screen and (max-width: 767px) {
    .formations-mobile-root table {
        font-size: 0.8125rem;
    }
    .formations-mobile-root th,
    .formations-mobile-root td {
        padding: 0.5rem 0.375rem !important;
    }
}

/* Pages type .a4-page (guides physique, manuelle, psychotechnique) */
@media screen and (max-width: 768px) {
    .formations-mobile-root .a4-page {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0.5rem auto !important;
        padding: 1rem !important;
        min-height: auto !important;
        overflow-x: hidden !important; /* pas de scroll horizontal de la page */
    }
    .formations-mobile-root .a4-page .flex.gap-8 {
        flex-direction: column;
    }
    .formations-mobile-root .a4-page [class*="w-1/2"] {
        width: 100% !important;
    }
    .formations-mobile-root .a4-page [class*="grid-cols-2"],
    .formations-mobile-root .a4-page [class*="grid-cols-3"] {
        grid-template-columns: 1fr;
    }
}
/* Tables dans .a4-page : scroll interne si nécessaire */
.formations-mobile-root .a4-page .overflow-x-auto {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

/* Images dans les guides : ne pas dépasser la largeur */
.formations-mobile-root img,
.formations-mobile-root .guide-img-step,
.formations-mobile-root .guide-img-feature,
.formations-mobile-root .guide-img-tools,
.formations-mobile-root .guide-img-main,
.formations-mobile-root .guide-img-schema,
.formations-mobile-root .illus-epreuve-wrap {
    max-width: 100% !important;
    height: auto;
}

/* Titres longs : césure */
.formations-mobile-root h1,
.formations-mobile-root h2,
.formations-mobile-root .chapter-title {
    word-wrap: break-word;
    overflow-wrap: break-word;
}
