/* ViaAduc Formation: styles scoped to this business unit. */
main.formation-page {
    --formation-violet: #be00b4;
    --formation-ink: #080877;
    --formation-muted: #65759b;
    container-type: inline-size;
    color: var(--formation-ink);
    background: #f6f9ff;
    font-family: var(--font-secondary, 'Open Sans', sans-serif);
}

main.formation-page :where(h1, h2, h3) {
    margin: 0;
    color: var(--formation-violet);
    font-family: var(--font-primary, 'Sansation', sans-serif);
    letter-spacing: -0.035em;
}

main.formation-page :where(p) { margin: 0; font-family: inherit; }
.formation-hero p,
.formation-section-heading p { font-family: var(--font-primary, 'Sansation', sans-serif); }
.formation-container { width: 92%; max-width: 1360px; margin-inline: auto; }

.formation-hero {
    --formation-hero-height: clamp(420px, 26vw, 500px);
    position: relative;
    display: grid;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    aspect-ratio: auto;
    height: var(--formation-hero-height);
    min-height: 420px;
    border-block: 1px solid transparent;
    isolation: isolate;
}

.formation-hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 180px;
    background: linear-gradient(180deg, rgba(246,249,255,0) 0%, rgba(246,249,255,0.2) 30%, rgba(246,249,255,0.98) 100%);
    pointer-events: none;
    z-index: 1;
}

.formation-hero-background {
    position: absolute;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.formation-hero-content { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; width: min(1180px, calc(100% - 36px)); min-height: var(--formation-hero-height); height: 100%; box-sizing: border-box; margin-inline: auto; padding: 18px 0 42px; text-align: center; }
.formation-hero h1 { font-size: clamp(48px, 4.7vw, 68px); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; }
.formation-hero h1 span { display: block; }
.formation-hero-title-main {
    color: #060679;
}
.formation-hero-gradient-word {
    display: inline-block;
    background: linear-gradient(90deg, #1e4fff 0%, #ff4c94 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.formation-hero p { margin-top: 14px; color: var(--formation-ink); font-size: clamp(16px, 1.45vw, 20px); line-height: 1.4; }

.formation-approach {
    padding-block: 3.6cqw;
    background: radial-gradient(ellipse at 75% 0%, #fff 0%, transparent 70%), linear-gradient(110deg, #d6e6fd, #eef5ff 65%, #e3efff);
}

.formation-section-heading { margin-bottom: 3cqw; text-align: center; }
.formation-section-heading h2 { font-size: 32px; line-height: 1.25; font-weight: 700; }
.formation-section-heading p { margin-top: 12px; color: var(--formation-muted); font-size: 14px; line-height: 1.4; }
.formation-approach-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1cqw; }

.formation-approach-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.7cqw 1.9cqw 1.9cqw;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 5px 22px rgba(83, 117, 177, 0.035);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.formation-approach-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: clamp(88px, 8.3cqw, 120px);
    aspect-ratio: 1;
    margin: 0 auto 1.1cqw;
    border-radius: 50%;
    background: #f3f7ff;
}

.formation-approach-icon img { display: block; width: 100%; height: 100%; object-fit: contain; }
.formation-approach-card h3 { margin-bottom: 12px; font-size: 17px; line-height: 1.2; letter-spacing: -0.035em; }
.formation-approach-card p { color: var(--formation-muted); font-size: 13px; line-height: 1.5; }

.formation-catalogue {
    padding-block: 3.7cqw 4.3cqw;
    background: radial-gradient(ellipse at 50% 0%, #fff 0%, transparent 76%), linear-gradient(105deg, #cce7ff, #f6f5ff 58%, #f4ddfb);
}

.formation-topics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25cqw; margin: 0; padding: 0; list-style: none; }

.formation-topic {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: min(0.7cqw, 10px);
    height: 100%;
    min-height: 8cqw;
    padding: min(1cqw, 14px);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.formation-topic-icon { display: grid; place-items: center; width: clamp(56px, 6.1cqw, 76px); aspect-ratio: 1; border-radius: 50%; background: linear-gradient(135deg, #e3f4ff, #f7faff); }
.formation-topic-icon img { display: block; width: 76%; height: 76%; object-fit: contain; }
.formation-topic h3 { font-size: 14px; line-height: 1.25; letter-spacing: -0.035em; }
.formation-topic-arrow { display: grid; place-items: center; width: clamp(30px, 3cqw, 36px); aspect-ratio: 1; border-radius: 50%; color: var(--formation-ink); background: #f1efff; font-size: 32px; line-height: 1; }

.formation-actions {
    padding: 6.1cqw 2.8% 4.1cqw;
    background: radial-gradient(ellipse at 0% 100%, #d8f1ff, transparent 55%), linear-gradient(120deg, #f5f3ff, #fff 55%, #eef6ff);
}

.formation-actions-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5cqw; max-width: 1440px; margin-inline: auto; container-type: inline-size; }
.formation-action { --formation-ink: #060679; display: flex; align-items: flex-start; min-width: 0; aspect-ratio: 2.12 / 1; padding: 3.2cqw 2.65cqw 2.2cqw; overflow: hidden; border-radius: 18px; background-size: cover; background-position: center; font-family: var(--font-primary, 'Sansation', sans-serif); }

/* These two illustrated cards use the text colors from the reference mockup. */
.formation-action-catalogue { background-image: url('../images/formation/catalogue-montagnes.png'); }
.formation-action-contact { background-image: url('../images/formation/contact-montagnes.png'); }
.formation-action-content { position: relative; width: 70%; }
.formation-action h2 { margin-bottom: 1.05cqw; color: var(--formation-ink); font-family: var(--font-primary, 'Sansation', sans-serif); font-size: clamp(24px, 3.15cqw, 46px); font-weight: 400; line-height: 1.05; letter-spacing: -0.035em; }
.formation-action h2 strong { display: block; font-weight: 700; }
.formation-action-catalogue h2 strong { font-size: 1.22em; }
.formation-action-contact h2 { font-size: clamp(23px, 3cqw, 44px); }
.formation-action p { margin-bottom: 1.7cqw; color: #526797; font-size: clamp(12px, 1.25cqw, 18px); line-height: 1.2; }
.formation-action-contact p { margin-bottom: 1.05cqw; }
.formation-action-catalogue h2,
.formation-action-catalogue p { color: #fff; }

.formation-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1.8cqw;
    min-height: 40px;
    padding: 1cqw 1.9cqw;
    border-radius: 999px;
    color: #fff;
    background: #1054ff;
    font-family: var(--font-primary, 'Sansation', sans-serif);
    font-size: clamp(12px, 1.25cqw, 18px);
    font-weight: 400;
    line-height: 1.3;
    white-space: nowrap;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.formation-button-light { color: var(--formation-ink); background: #fff; font-weight: 700; }
.formation-button span { font-size: clamp(20px, 1.8cqw, 26px); line-height: 1; }
.formation-page :is(.formation-approach-card, .formation-topic, .formation-button):hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(79, 84, 147, 0.13); }
.formation-button:hover { color: #fff; }
.formation-button-light:hover { color: var(--formation-ink); }
.formation-page a:focus-visible { outline: 3px solid var(--formation-violet); outline-offset: 5px; }

@media (max-width: 1050px) {
    .formation-approach, .formation-catalogue { padding-block: 42px; }
    .formation-section-heading { margin-bottom: 30px; }
    .formation-approach-grid, .formation-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
    .formation-approach-card { padding: 24px; }
    .formation-approach-icon { margin-bottom: 20px; }
    .formation-topic { min-height: 94px; padding: 14px; gap: 16px; }
    .formation-actions { padding: 45px 4%; }
    .formation-actions-grid { gap: 18px; }
    .formation-action { min-height: 240px; padding: 25px 20px; }
    .formation-action h2 { margin-bottom: 12px; }
    .formation-action p { margin-bottom: 16px; }
    .formation-action-break { display: none; }
    .formation-button { gap: 16px; padding: 10px 18px; }
}

@media (max-width: 700px) {
    .formation-hero { --formation-hero-height: 400px; aspect-ratio: auto; }
    .formation-hero-content { height: auto; padding-bottom: 24px; }
    .formation-hero-content { width: 90%; }
    .formation-hero h1 { font-size: clamp(30px, 6.2vw, 36px); line-height: 1.15; }
    .formation-hero h1 span { margin-top: 8px; }
    .formation-hero p { margin-top: 24px; }
    .formation-desktop-break { display: none; }
    .formation-section-heading h2 { font-size: 26px; }
    .formation-section-heading p { line-height: 1.4; }
    .formation-approach-card { padding: 22px 18px; }
    .formation-actions-grid { grid-template-columns: minmax(0, 1fr); }
    .formation-action { min-height: 250px; padding: 6.4cqw 5.3cqw; }
    .formation-action h2 { font-size: clamp(24px, 6.3cqw, 38px); }
    .formation-action-contact h2 { font-size: clamp(23px, 6cqw, 36px); }
    .formation-action p { max-width: 280px; font-size: 14px; }
    .formation-button { font-size: 13px; }
}

@media (max-width: 520px) {
    .formation-hero { --formation-hero-height: 380px; }
}

@media (max-width: 480px) {
    .formation-container { width: calc(100% - 36px); }
    .formation-approach-grid, .formation-topics { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .formation-approach-card { padding: 24px; }
    .formation-approach-card p { font-size: 14px; }
    .formation-topic-icon { width: 66px; }
    .formation-topic-arrow { width: 36px; }
    .formation-actions { padding: 30px 18px 40px; }
}
