/* Catalogue des formations : nos-formations, toutes-nos-formations et leur version anglaise. */
.cat-scope {
    --cat-ink: #2b2826;
    --cat-soft: #6b655e;
    --cat-paper: #f7f5f2;
    --cat-fill: #ebe7e1;
    --cat-accent: #ed5f54;
    --cat-accent-ink: #c8443a;
    --cat-serif: 'Instrument Serif', 'Times New Roman', serif;
    --cat-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --cat-ease: cubic-bezier(0.22, 1, 0.36, 1);
    display: block;
    width: 100%;
    padding: 4rem 0 7rem; /* était 9rem en haut : trop d'espace sous le header */
    background: var(--cat-paper);
    color: var(--cat-ink);
    font-family: var(--cat-sans);
}

.cat-scope *,
.cat-scope *::before,
.cat-scope *::after {
    box-sizing: border-box;
}

/* style.css impose ses marges, alignements et couleurs a tout le site. */
.cat-scope :is(h1, h2, h3, p) {
    margin: 0 !important;
    padding: 0;
    color: inherit;
    text-align: left !important;
    -webkit-text-fill-color: currentColor;
}

.cat-scope :is(h1, h2, h3) {
    font-weight: 400 !important;
}

.cat-scope :is(h1, h2, h3)::before,
.cat-scope :is(h1, h2, h3)::after {
    content: none !important;
    display: none !important;
}

.cat-scope strong {
    color: inherit !important;
    font-weight: 600;
}

.cat-scope a {
    color: inherit;
    text-decoration: none !important;
}

.cat-scope .cat-container {
    display: block;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 2.5rem;
}

/* En-tete */
.cat-scope .cat-hero {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 4rem;
    align-items: end;
    padding: 0;
}

.cat-scope .cat-title {
    --iia-heading-size: clamp(3.5rem, 2rem + 7vw, 8.5rem);
    font-family: var(--cat-serif);
    font-weight: 400;
    letter-spacing: -0.025em;
    line-height: 0.95 !important;
}

.cat-scope .cat-title em {
    display: block;
    margin-top: -0.2em;
    color: var(--cat-accent);
    font-family: inherit;
    font-style: italic;
}

.cat-scope .cat-intro {
    --iia-copy-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
    color: var(--cat-soft);
}

.cat-scope .cat-intro strong {
    color: var(--cat-ink) !important;
    font-weight: 500;
}

.cat-scope .cat-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 3.5rem;
    margin: 4.5rem 0 0;
    padding: 0;
}

.cat-scope .cat-stat {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    color: var(--cat-soft);
    font-size: 0.9375rem;
}

.cat-scope .cat-stat b {
    color: var(--cat-ink);
    font-family: var(--cat-serif);
    font-size: 2.25rem;
    font-weight: 400;
    line-height: 1;
}

/* Filtres */
.cat-scope .cat-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 3.5rem 0 6rem;
    scroll-margin-top: 7rem;
}

.cat-scope .cat-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.15rem;
    border: 0;
    border-radius: 999px;
    background: var(--cat-fill);
    color: var(--cat-ink);
    font-family: var(--cat-sans);
    font-size: 0.9375rem !important;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s var(--cat-ease), color 0.3s var(--cat-ease);
}

.cat-scope .cat-filter-btn:hover {
    background: #ded9d1;
}

.cat-scope .cat-filter-btn[aria-pressed="true"] {
    background: var(--cat-ink);
    color: #ffffff;
}

.cat-scope .cat-filter-btn .count {
    color: inherit;
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
    opacity: 0.6;
}

/* Disciplines */
.cat-scope .cat-sec {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: 4rem;
    align-items: start;
    padding: 0;
    margin-bottom: 7rem;
}

.cat-scope .cat-sec[hidden] {
    display: none;
}

.cat-scope .cat-sec.is-reveal {
    animation: catReveal 0.6s var(--cat-ease) backwards;
}

@keyframes catReveal {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
}

.cat-scope .cat-sec-head {
    position: sticky;
    top: 8rem;
}

.cat-scope .cat-sec-num {
    display: block;
    margin-bottom: 1rem;
    color: var(--cat-accent-ink);
    font-family: var(--cat-serif);
    font-size: 1.25rem;
    font-style: italic;
}

.cat-scope .cat-sec-title {
    --iia-heading-size: clamp(2.25rem, 1.75rem + 1.6vw, 3.25rem);
    font-family: var(--cat-serif);
    font-weight: 400;
    letter-spacing: -0.015em;
    line-height: 1.05 !important;
}

.cat-scope .cat-sec-desc {
    --iia-copy-size: 1rem;
    margin-top: 1rem !important;
    max-width: 30ch;
    color: var(--cat-soft);
}

.cat-scope .cat-list {
    display: block;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cat-scope .cat-list li {
    display: block;
    margin: 0;
    padding: 0;
}

.cat-scope .cat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-inline: -1.5rem;
    padding: 0.95rem 1.5rem;
    border-radius: 18px;
    transition: background-color 0.35s var(--cat-ease), box-shadow 0.35s var(--cat-ease);
}

.cat-scope .cat-row-title {
    --iia-heading-size: clamp(1.625rem, 1.4rem + 0.8vw, 2.25rem);
    font-family: var(--cat-serif);
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.15 !important;
    transition: transform 0.35s var(--cat-ease);
}

.cat-scope .cat-row-arrow {
    display: grid;
    flex: none;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--cat-fill);
    transition: background-color 0.35s var(--cat-ease), color 0.35s var(--cat-ease), transform 0.35s var(--cat-ease);
}

.cat-scope .cat-row-arrow svg {
    display: block;
    width: 16px;
    height: 16px;
}

.cat-scope .cat-row:hover,
.cat-scope .cat-row:focus-visible {
    background: #ffffff;
    box-shadow: 0 14px 40px rgba(43, 40, 38, 0.08);
}

.cat-scope .cat-row:hover .cat-row-title,
.cat-scope .cat-row:focus-visible .cat-row-title {
    transform: translateX(6px);
}

.cat-scope .cat-row:hover .cat-row-arrow,
.cat-scope .cat-row:focus-visible .cat-row-arrow {
    background: var(--cat-accent);
    color: #1f1d1b;
    transform: rotate(45deg);
}

.cat-scope :is(.cat-row, .cat-filter-btn, .cat-bottom-cta):focus-visible {
    outline: 2px solid var(--cat-accent-ink);
    outline-offset: 3px;
}

/* Encart final */
.cat-scope .cat-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2.5rem;
    align-items: center;
    padding: clamp(2.5rem, 1.5rem + 4vw, 5.5rem);
    border-radius: 32px;
    background: var(--cat-ink);
    color: #ffffff;
}

.cat-scope .cat-bottom-text {
    --iia-copy-size: clamp(2rem, 1.5rem + 2.2vw, 3.75rem);
    max-width: 18ch;
    font-family: var(--cat-serif);
    letter-spacing: -0.015em;
    line-height: 1.08 !important;
}

.cat-scope .cat-bottom-text em {
    color: #ff9389;
    font-family: inherit;
    font-style: italic;
}

.cat-scope .cat-bottom-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.1rem 1.9rem;
    border-radius: 999px;
    background: #ffffff;
    color: var(--cat-ink);
    font-weight: 500;
    white-space: nowrap !important;
    transition: background-color 0.35s var(--cat-ease);
}

.cat-scope .cat-bottom-cta:hover {
    background: var(--cat-accent);
    color: #1f1d1b;
}

.cat-scope .cat-bottom-cta svg {
    flex: none;
    width: 16px;
    height: 16px;
}

/* Sous 1141px, le header reserve sa propre hauteur. */
@media (max-width: 1140px) {
    .cat-scope {
        padding-top: 3.5rem;
    }

    .cat-scope .cat-sec-head {
        position: static;
    }
}

@media (max-width: 900px) {
    .cat-scope .cat-hero,
    .cat-scope .cat-sec {
        grid-template-columns: minmax(0, 1fr);
        gap: 2rem;
    }

    .cat-scope .cat-sec {
        margin-bottom: 5rem;
    }

    .cat-scope .cat-sec-desc {
        max-width: 42ch;
    }

    .cat-scope .cat-filters {
        margin-bottom: 4rem;
    }

    .cat-scope .cat-bottom {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .cat-scope {
        padding: 2.5rem 0 4rem;
    }

    .cat-scope .cat-container {
        padding: 0 16px;
    }

    .cat-scope .cat-stats {
        gap: 1rem 2rem;
        margin-top: 2.5rem;
    }

    .cat-scope .cat-row {
        gap: 1rem;
        margin-inline: 0;
        padding: 0.8rem 0;
    }

    .cat-scope .cat-row:hover,
    .cat-scope .cat-row:focus-visible {
        background: transparent;
        box-shadow: none;
    }

    .cat-scope .cat-row-arrow {
        width: 36px;
        height: 36px;
    }

    .cat-scope .cat-bottom {
        border-radius: 24px;
    }

    .cat-scope .cat-bottom-cta {
        justify-content: center;
        white-space: normal !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cat-scope *,
    .cat-scope *::before,
    .cat-scope *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* Fond papier jusqu'en haut de la page : style.css peint html en blanc et style-header.css
   peint le conteneur #arbree-header en blanc (bande au-dessus du header flottant). */
@layer iia-header {
    html:has(.cat-scope),
    html body:has(.cat-scope) {
        background: #f7f5f2 !important;
        background-color: #f7f5f2 !important;
    }
    html body:has(.cat-scope) #arbree-header#arbree-header,
    html body:has(.cat-scope) #arbree-header#arbree-header.scrolled {
        background: transparent !important;
        background-color: transparent !important;
    }
}
