/**
 * ACF Education — Programme de formation natif
 *
 * Structure commune des pages de programmes. Aucune couleur métier n'est
 * définie ici : les couleurs proviennent d'ACF Core → Thèmes logiciels via
 * --acf-program-primary, --acf-program-secondary, --acf-program-light,
 * --acf-program-text-on-primary et --acf-program-button.
 */

body.acf-programme-formation .acf-programme-page,
body.acf-programme-formation .acf-programme-page * {
    box-sizing: border-box;
}

body.acf-programme-formation .acf-programme-page {
    --acf-pg-accent: var(--acf-program-primary, #8b3fb5);
    --acf-pg-dark: var(--acf-program-secondary, #071b3b);
    --acf-pg-soft: var(--acf-program-light, #faf7fc);
    --acf-pg-on-dark: var(--acf-program-text-on-primary, #ffffff);
    --acf-pg-on-accent: var(--acf-program-text-on-accent, var(--acf-pg-on-dark));
    --acf-pg-on-secondary: var(--acf-program-text-on-secondary, var(--acf-pg-on-dark));
    --acf-pg-on-button: var(--acf-program-text-on-button, var(--acf-pg-on-dark));
    --acf-pg-button: var(--acf-program-button, var(--acf-pg-accent));
    --acf-pg-text: #0b1f33;
    --acf-pg-muted: #5f6f7b;
    --acf-pg-border: #e5e1ee;
    --acf-pg-line: #c9d3de;
    --acf-pg-shell: 1200px;
    --acf-pg-radius: 18px;
    width: 100%;
    margin: 0;
    padding: 0;
    color: var(--acf-pg-text);
    background: #fff;
    font-family: Montserrat, Arial, sans-serif;
}

/* Neutralise les ornements globaux du thème sur les titres internes. */
body.acf-programme-formation .acf-programme-page :is(h1,h2,h3,h4,h5,h6) {
    text-shadow: none;
    filter: none;
    transform: none;
    text-decoration: none;
}
body.acf-programme-formation .acf-programme-page :is(h1,h2,h3,h4,h5,h6)::before,
body.acf-programme-formation .acf-programme-page :is(h1,h2,h3,h4,h5,h6)::after {
    content: none !important;
    display: none !important;
}

/* Shells */
body.acf-programme-formation .acf-programme-shell {
    width: min(calc(100% - 80px), var(--acf-pg-shell));
    margin-inline: auto;
}
body.acf-programme-formation .acf-programme-section {
    padding-block: 65px;
}
body.acf-programme-formation .acf-programme-section-title {
    margin: 0 0 28px;
    color: var(--acf-pg-text);
    font-size: 34px;
    line-height: 1.2;
    font-weight: 700;
    text-align: center;
}
body.acf-programme-formation .acf-programme-section-intro {
    max-width: 850px;
    margin: -8px auto 34px;
    color: var(--acf-pg-muted);
    font-size: 16px;
    line-height: 1.6;
    text-align: center;
}

/* Hero */
body.acf-programme-formation .acf-programme-hero {
    display: grid;
    grid-template-columns: minmax(0,49%) minmax(0,47%);
    gap: 4%;
    min-height: 480px;
    padding: 58px max(40px, calc((100vw - var(--acf-pg-shell))/2 + 40px));
    align-items: center;
    background: var(--acf-pg-dark);
    color: var(--acf-pg-on-secondary);
    border-radius: 0 0 34px 34px;
}
body.acf-programme-formation .acf-programme-kicker {
    margin: 0 0 14px;
    color: var(--acf-pg-accent);
    font-size: 14px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 2.2px;
    text-transform: uppercase;
}
body.acf-programme-formation .acf-programme-hero h1 {
    margin: 0 0 20px;
    color: var(--acf-pg-on-secondary);
    font-size: 40px;
    line-height: 1.1;
    font-weight: 700;
}
body.acf-programme-formation .acf-programme-hero-copy > p {
    margin: 0;
    color: color-mix(in srgb, var(--acf-pg-on-secondary) 84%, transparent);
    font-size: 16px;
    line-height: 1.65;
}
body.acf-programme-formation .acf-programme-hero-media {
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--acf-pg-on-secondary) 16%, transparent);
    border-radius: 24px;
    box-shadow: 0 16px 34px -24px rgba(0,0,0,.32);
}
body.acf-programme-formation .acf-programme-hero-media img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    border-radius: 24px;
}

/* Boutons */
body.acf-programme-formation .acf-programme-actions,
body.acf-programme-formation .acf-programme-resource-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-top: 24px;
}
body.acf-programme-formation .acf-programme-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 13px 18px;
    border: 0;
    border-radius: 10px;
    background: var(--acf-pg-button);
    color: var(--acf-pg-on-button);
    font-size: 13px;
    line-height: 1.2;
    font-weight: 700;
    text-decoration: none;
}
body.acf-programme-formation .acf-programme-button:hover,
body.acf-programme-formation .acf-programme-button:focus {
    filter: brightness(1.08);
    color: var(--acf-pg-on-dark);
}

/* Cartes de synthèse */
body.acf-programme-formation .acf-programme-summary {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 22px;
}
body.acf-programme-formation .acf-programme-summary-card {
    padding: 26px;
    background: #fff;
    border: 1px solid var(--acf-pg-border);
    border-radius: var(--acf-pg-radius);
}
body.acf-programme-formation .acf-programme-summary-icon {
    margin-bottom: 12px;
    color: var(--acf-pg-accent);
    font-size: 30px;
    line-height: 1;
}
body.acf-programme-formation .acf-programme-summary-card h3 {
    margin: 0 0 8px;
    color: var(--acf-pg-text);
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
}
body.acf-programme-formation .acf-programme-summary-card p {
    margin: 0;
    color: var(--acf-pg-muted);
    font-size: 14px;
    line-height: 1.6;
}

/* Parcours / demi-journées */
body.acf-programme-formation .acf-programme-path {
    padding-block: 60px 70px;
    background: var(--acf-pg-soft);
}
body.acf-programme-formation .acf-programme-path-list {
    display: flex;
    flex-direction: column;
    gap: 38px;
}
body.acf-programme-formation .acf-programme-halfday {
    display: grid;
    grid-template-columns: 46% 54%;
    gap: 28px;
    align-items: stretch;
}
body.acf-programme-formation .acf-programme-halfday-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 285px;
    padding-top: 10px;
    text-align: center;
}
body.acf-programme-formation .acf-programme-halfday-band {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 62px;
    border-radius: 999px;
    background: var(--acf-pg-accent);
    color: var(--acf-pg-on-accent);
    font-size: 27px;
    line-height: 1;
    box-shadow: 0 6px 16px -8px rgba(7,27,59,.28);
}
body.acf-programme-formation .acf-programme-halfday:nth-child(even) .acf-programme-halfday-band {
    background: var(--acf-pg-dark);
    color: var(--acf-pg-on-secondary);
}
body.acf-programme-formation .acf-programme-halfday-day {
    margin-top: 28px;
    color: var(--acf-pg-accent);
    font-size: 13px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 1.1px;
}
body.acf-programme-formation .acf-programme-halfday:nth-child(even) .acf-programme-halfday-day {
    color: var(--acf-pg-dark);
}
body.acf-programme-formation .acf-programme-halfday-period {
    margin-top: 12px;
    color: var(--acf-pg-text);
    font-size: 15px;
    line-height: 1.2;
    font-weight: 700;
}
body.acf-programme-formation .acf-programme-halfday-meta::after {
    content: "";
    display: block;
    width: 100%;
    height: 34px;
    margin-top: auto;
    background: var(--acf-pg-line);
}
body.acf-programme-formation .acf-programme-halfday-card {
    min-height: 285px;
    padding: 28px 30px;
    background: #fff;
    border: 1px solid var(--acf-pg-border);
    border-radius: var(--acf-pg-radius);
    box-shadow: 0 8px 22px -18px rgba(7,27,59,.18);
}
body.acf-programme-formation .acf-programme-halfday-number {
    margin: 0 0 12px;
    color: var(--acf-pg-accent);
    font-size: 13px;
    line-height: 1.2;
    font-weight: 700;
}
body.acf-programme-formation .acf-programme-halfday:nth-child(even) .acf-programme-halfday-number {
    color: var(--acf-pg-dark);
}
body.acf-programme-formation .acf-programme-halfday-card h3 {
    margin: 0 0 20px;
    color: var(--acf-pg-text);
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
}
body.acf-programme-formation .acf-programme-halfday-card ul {
    margin: 0;
    padding-left: 18px;
}
body.acf-programme-formation .acf-programme-halfday-card li {
    margin: 5px 0;
    color: var(--acf-pg-muted);
    font-size: 14px;
    line-height: 1.65;
}

/* Informations essentielles */
body.acf-programme-formation .acf-programme-info-grid {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 16px;
}
body.acf-programme-formation .acf-programme-info-card,
body.acf-programme-formation .acf-programme-quality-card {
    min-height: 255px;
    padding: 22px;
    background: #fff;
    border: 1px solid var(--acf-pg-border);
    border-radius: var(--acf-pg-radius);
    box-shadow: 0 10px 26px -20px rgba(7,27,59,.18);
}
body.acf-programme-formation .acf-programme-info-icon {
    margin-bottom: 12px;
    color: var(--acf-pg-accent);
    font-size: 24px;
}
body.acf-programme-formation .acf-programme-info-card h3 {
    margin: 0 0 10px;
    color: var(--acf-pg-text);
    font-size: 17px;
    line-height: 1.3;
    font-weight: 700;
}
body.acf-programme-formation .acf-programme-info-card p {
    margin: 0;
    color: var(--acf-pg-muted);
    font-size: 14px;
    line-height: 1.6;
}
body.acf-programme-formation .acf-programme-info-card a {
    color: var(--acf-pg-accent);
    overflow-wrap: anywhere;
}
body.acf-programme-formation .acf-programme-info-card.is-accent {
    background: var(--acf-pg-accent);
    border-color: var(--acf-pg-accent);
}
body.acf-programme-formation .acf-programme-info-card.is-accent,
body.acf-programme-formation .acf-programme-info-card.is-accent * {
    color: var(--acf-pg-on-dark);
}
body.acf-programme-formation .acf-programme-quality-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
body.acf-programme-formation .acf-programme-quality-card img {
    display: block;
    width: 100%;
    max-width: 220px;
    height: auto;
    margin: 0 auto 14px;
}

/* Ressources */
body.acf-programme-formation .acf-programme-resources .acf-programme-shell {
    width: min(calc(100% - 80px),900px);
}
body.acf-programme-formation .acf-programme-resource-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 18px;
}
body.acf-programme-formation .acf-programme-resource-card {
    padding: 24px;
    background: #fff;
    border: 1px solid var(--acf-pg-border);
    border-radius: var(--acf-pg-radius);
}
body.acf-programme-formation .acf-programme-resource-icon {
    margin-bottom: 12px;
    color: var(--acf-pg-accent);
    font-size: 24px;
    font-weight: 800;
}
body.acf-programme-formation .acf-programme-resource-card h3 {
    margin: 0 0 8px;
    color: var(--acf-pg-text);
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
}
body.acf-programme-formation .acf-programme-resource-card p {
    margin: 0 0 16px;
    color: var(--acf-pg-muted);
    font-size: 14px;
    line-height: 1.6;
}

/* CTA final */
body.acf-programme-formation .acf-programme-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;
    padding: 60px max(40px,calc((100vw - 920px)/2));
    background: var(--acf-pg-dark);
    color: var(--acf-pg-on-dark);
}
body.acf-programme-formation .acf-programme-cta h2 {
    margin: 0 0 10px;
    color: var(--acf-pg-on-dark);
    font-size: 30px;
    line-height: 1.2;
    font-weight: 700;
}
body.acf-programme-formation .acf-programme-cta p {
    margin: 0;
    color: color-mix(in srgb, var(--acf-pg-on-secondary) 84%, transparent);
    font-size: 16px;
    line-height: 1.6;
}

@media (max-width: 900px) {
    body.acf-programme-formation .acf-programme-shell,
    body.acf-programme-formation .acf-programme-resources .acf-programme-shell {
        width: calc(100% - 48px);
    }
    body.acf-programme-formation .acf-programme-hero {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 48px 28px;
    }
    body.acf-programme-formation .acf-programme-summary,
    body.acf-programme-formation .acf-programme-info-grid,
    body.acf-programme-formation .acf-programme-resource-grid {
        grid-template-columns: 1fr;
    }
    body.acf-programme-formation .acf-programme-halfday {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    body.acf-programme-formation .acf-programme-halfday-meta {
        min-height: 0;
        align-items: flex-start;
        text-align: left;
    }
    body.acf-programme-formation .acf-programme-halfday-band {
        width: 62px;
    }
    body.acf-programme-formation .acf-programme-halfday-meta::after {
        display: none;
    }
    body.acf-programme-formation .acf-programme-halfday-card {
        min-height: 0;
    }
    body.acf-programme-formation .acf-programme-cta {
        flex-direction: column;
        align-items: flex-start;
        padding: 48px 28px;
    }
}

@media (max-width: 600px) {
    body.acf-programme-formation .acf-programme-shell,
    body.acf-programme-formation .acf-programme-resources .acf-programme-shell {
        width: calc(100% - 28px);
    }
    body.acf-programme-formation .acf-programme-section {
        padding-block: 48px;
    }
    body.acf-programme-formation .acf-programme-section-title {
        font-size: 28px;
    }
    body.acf-programme-formation .acf-programme-hero h1 {
        font-size: 30px;
    }
    body.acf-programme-formation .acf-programme-button {
        width: 100%;
    }
}

/* Compatibilité structurelle : une section ressources peut porter directement le shell. */
body.acf-programme-formation .acf-programme-section.acf-programme-resources {
    width: min(calc(100% - 80px),900px);
    margin-inline: auto;
}
@media (max-width:900px) {
    body.acf-programme-formation .acf-programme-section.acf-programme-resources {
        width: calc(100% - 48px);
    }
}
@media (max-width:600px) {
    body.acf-programme-formation .acf-programme-section.acf-programme-resources {
        width: calc(100% - 28px);
    }
}

/* ========================================================================== 
 * v0.1.82 — composants natifs communs des programmes de formation
 *
 * Ces composants évitent d'embarquer du CSS dans chaque page JSON. Les pages
 * fournissent uniquement leur contenu et des classes sémantiques ; les couleurs
 * continuent de provenir d'ACF Core → Thèmes logiciels.
 * ========================================================================== */

/* Logo et sous-titre optionnels du hero. */
body.acf-programme-formation .acf-programme-hero-logo {
    display: block;
    width: 220px;
    max-width: 100%;
    height: auto;
    margin: 0 0 14px;
    border-radius: 0;
}
body.acf-programme-formation .acf-programme-hero-subtitle {
    margin: -8px 0 10px;
    color: color-mix(in srgb, var(--acf-pg-on-secondary) 86%, transparent);
    font-size: 18px;
    line-height: 1.35;
    font-weight: 600;
}

/* Variante plus compacte utilisée quand le hero contient logo + sous-titre. */
body.acf-programme-formation .acf-programme-hero--compact {
    grid-template-columns: minmax(0,52%) minmax(0,44%);
    gap: 4%;
    min-height: 410px;
    padding-top: 44px;
    padding-bottom: 44px;
}
body.acf-programme-formation .acf-programme-hero--compact .acf-programme-hero-media {
    aspect-ratio: 1.58 / 1;
}
body.acf-programme-formation .acf-programme-hero--compact .acf-programme-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Bandeau Lieu / Effectif / Durée. */
body.acf-programme-formation .acf-programme-facts {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 20px;
    padding-block: 28px;
}
body.acf-programme-formation .acf-programme-fact {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    padding: 22px;
    border-radius: 16px;
    background: var(--acf-pg-dark);
    color: var(--acf-pg-on-secondary);
}
body.acf-programme-formation .acf-programme-fact-icon {
    flex: 0 0 auto;
    color: var(--acf-pg-accent);
    font-size: 28px;
    line-height: 1;
    font-weight: 700;
}
body.acf-programme-formation .acf-programme-fact-copy {
    min-width: 0;
}
body.acf-programme-formation .acf-programme-fact strong,
body.acf-programme-formation .acf-programme-fact span {
    display: block;
}
body.acf-programme-formation .acf-programme-fact strong {
    margin-bottom: 5px;
    color: var(--acf-pg-accent);
    font-size: 12px;
    line-height: 1.2;
    font-weight: 700;
}
body.acf-programme-formation .acf-programme-fact span {
    color: var(--acf-pg-on-secondary);
    font-size: 14px;
    line-height: 1.45;
}

/* Listes utilisées dans les cartes de synthèse. */
body.acf-programme-formation .acf-programme-summary-card ul {
    margin: 0;
    padding-left: 18px;
}
body.acf-programme-formation .acf-programme-summary-card li {
    margin: 5px 0;
    color: var(--acf-pg-muted);
    font-size: 14px;
    line-height: 1.6;
}

/* Sous-titre rouge/couleur logiciel du parcours. */
body.acf-programme-formation .acf-programme-path-subtitle {
    margin: -18px 0 34px;
    color: var(--acf-pg-accent);
    font-size: 14px;
    line-height: 1.4;
    font-weight: 700;
}
body.acf-programme-formation .acf-programme-section-title.is-left {
    text-align: left;
}

/* Variantes larges pour Qualiopi et Ressources. */
body.acf-programme-formation .acf-programme-quality-card--wide {
    grid-column: span 2;
}
body.acf-programme-formation .acf-programme-resource-card--wide {
    grid-column: 1 / -1;
}

/* Les ressources utilisent désormais le même shell 1200 px que le reste. */
body.acf-programme-formation .acf-programme-resources .acf-programme-shell {
    width: min(calc(100% - 80px),var(--acf-pg-shell));
}
body.acf-programme-formation .acf-programme-section.acf-programme-resources {
    width: min(calc(100% - 80px),var(--acf-pg-shell));
    max-width: var(--acf-pg-shell);
    margin-inline: auto;
}
body.acf-programme-formation .acf-programme-resource-grid:has(.acf-programme-resource-card--wide) {
    grid-template-columns: 1fr;
}

@media (max-width: 900px) {
    body.acf-programme-formation .acf-programme-hero--compact {
        grid-template-columns: 1fr;
        min-height: 0;
        gap: 28px;
        padding: 44px 28px;
    }
    body.acf-programme-formation .acf-programme-hero--compact .acf-programme-hero-media {
        aspect-ratio: 16 / 9;
    }
    body.acf-programme-formation .acf-programme-resources .acf-programme-shell,
    body.acf-programme-formation .acf-programme-section.acf-programme-resources {
        width: calc(100% - 48px);
    }
    body.acf-programme-formation .acf-programme-quality-card--wide {
        grid-column: span 1;
    }
}

/* Les trois informations restent côte à côte sur tablette ; empilage sur mobile. */
@media (max-width: 600px) {
    body.acf-programme-formation .acf-programme-facts {
        grid-template-columns: 1fr;
        gap: 10px;
        padding-block: 20px;
    }
    body.acf-programme-formation .acf-programme-fact {
        padding: 16px;
    }
    body.acf-programme-formation .acf-programme-resources .acf-programme-shell,
    body.acf-programme-formation .acf-programme-section.acf-programme-resources {
        width: calc(100% - 28px);
    }
}
