/* Public layouts must accommodate the shared typography and browser zoom. */
body:not(.admin-body):not(.admin-login-clean) { zoom: 1; }
body main#main-content :is(.hero-buttons, .hero-actions, .cta-buttons, .cta-actions, .card-actions) { display: flex; flex-wrap: wrap; gap: 12px; min-width: 0; }
body main#main-content :is(.hero-buttons, .hero-actions, .cta-buttons, .cta-actions, .card-actions) > * { min-width: 0; max-width: 100%; }
@media (max-height: 700px), (max-width: 1199px) {
    body main#main-content :is(.hero-home, .formation-hero, .communication-hero, .career-hero, .application-hero) { height: auto; min-height: 0; aspect-ratio: auto; }
}
body main#main-content :is(.card-content, .card-body, .form-group,
    .application-field, .contact-field, .offer-content, .blog-single-main,
    .formation-topic, .communication-specific-card, .communication-practice-card) {
    min-width: 0;
    max-width: 100%;
}
body main#main-content :is(.cards-grid, .expertise-grid, .form-row,
    .formation-topics, .formation-approach-grid, .savoir-faire-grid,
    .communication-specific-grid, .communication-practice-grid) > * {
    min-width: 0;
}
body main#main-content :is(h1, h2, h3, h4, h5, h6, p, li, label,
    .card-text, .card-description, .faq-answer, .page-faq-answer,
    .offer-meta-item, .contact-info-value) {
    overflow-wrap: anywhere;
    word-break: normal;
}
body main#main-content :is(h1, h2, h3, h4, h5, h6) {
    white-space: normal;
}
body main#main-content :is(.btn, .formation-button, .communication-cta__button,
    .offer-apply-btn, .contact-submit, .va-cta-button) {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
}
body main#main-content :is(.btn, .va-cta-button) > span { min-width: 0; }
body main#main-content :is(input, select, textarea) { min-width: 0; max-width: 100%; }

/* Let card grids reduce their column count before the text is cramped. */
body main#main-content .formation-approach-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}
body main#main-content .formation-topics {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
body main#main-content .savoir-faire-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
body main#main-content .communication-specific-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
}

/* Search cards used a fixed height which clipped enlarged text. */
body main#main-content .search-card { height: auto; min-height: 246px; }
body main#main-content .search-card .card-content { height: 100%; }
body main#main-content .search-card-action { flex-wrap: wrap; }

/* Long URLs and addresses must not widen article or legal columns. */
body main#main-content :is(.blog-single-main, .legal-copy, .contact-info) a {
    overflow-wrap: anywhere;
}

/* The home tooltip must also fit the effective viewport at the site's zoom. */
@media (max-width: 1024px) {
    body main#main-content :is(.formation-approach-grid, .formation-topics,
        .savoir-faire-grid, .communication-practice-grid, .communication-specific-grid) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    body main#main-content .transformation-grid {
        grid-template-columns: minmax(0, 1fr);
        padding-inline: 0;
        gap: 16px;
    }
    body main#main-content .transformation-route { display: none; }
    body main#main-content .transformation-card { height: auto; min-width: 0; }
    body main#main-content .formation-action { aspect-ratio: auto; height: auto; min-height: 250px; }
    body main#main-content .formation-action-content { width: 100%; }
    body main#main-content :is(.formation-button, .communication-cta__button,
        .transformation-cta-button, .offer-apply-btn, .contact-submit) {
        min-width: 0;
        min-height: 44px;
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 600px) {
    body main#main-content :is(.formation-approach-grid, .formation-topics,
        .formation-actions-grid, .savoir-faire-grid,
        .communication-practice-grid, .communication-specific-grid) {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }
    body main#main-content :is(.formation-hero, .communication-hero, .application-hero, .career-hero) {
        height: auto;
        aspect-ratio: auto;
    }
    body.home-page main#main-content .hero-viaaduc-card {
        width: min(320px, 78vw);
        max-width: 320px;
    }
    body main#main-content .contact-detail > div { min-width: 0; }
}
