/* ==========================================================================
   "Présentation" page
   Photo composition (.estc-portrait) comes from estc_components.css
   ========================================================================== */

.estc-pres {
    background: #fbfbfc;
}

/* ---- Shared labels ---- */
.estc-pres__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 18px;
    font-family: var(--estc-font-body);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--estc-primary);
}

.estc-pres__eyebrow::before {
    content: '';
    width: 40px;
    height: 2px;
    background: #c9a227;
}

.estc-pres__eyebrow--light {
    color: #e2c46a;
}

/* ---- Intro ---- */
.estc-pres__intro {
    position: relative;
    overflow: hidden;
    padding: 88px 0 72px;
    background: radial-gradient(900px 480px at 100% 0%, rgba(0, 75, 130, .05), transparent 65%);
}

/* Faint zellige patch behind the photo */
.estc-pres__intro::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 46%;
    height: 100%;
    background: url('../../images/patterns/pattern_05.png') repeat;
    background-size: 150px;
    opacity: .05;
    -webkit-mask-image: radial-gradient(farthest-side at 100% 20%, #000 25%, transparent);
    mask-image: radial-gradient(farthest-side at 100% 20%, #000 25%, transparent);
    pointer-events: none;
}

.estc-pres__intro-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 88px;
    align-items: center;
}

.estc-pres__heading {
    margin: 0 0 32px;
    font-family: var(--estc-font-heading);
    font-size: 44px;
    font-weight: 500;
    line-height: 1.18;
    letter-spacing: -.3px;
    color: var(--estc-heading);
}

/* Drop cap on the opening sentence */
.estc-pres__lead {
    margin: 0 0 22px;
    font-size: 19px;
    line-height: 1.85;
    color: var(--estc-heading);
}

.estc-pres__lead::first-letter {
    float: left;
    margin: 8px 14px 0 0;
    font-family: var(--estc-font-heading);
    font-size: 74px;
    line-height: .8;
    color: var(--estc-primary);
}

.estc-pres__text {
    margin: 0;
    font-size: 17px;
    line-height: 1.95;
    color: var(--estc-text);
}

/* The photo is landscape: keep the frame shorter than the director's portrait */
.estc-pres__figure .estc-portrait__frame img {
    aspect-ratio: 9 / 7;
    max-height: 460px;
}

/* ---- Key figures ---- */
.estc-pres__facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
    background:
        url('../../images/patterns/pattern_05.png') repeat,
        var(--estc-secondary);
    background-size: 110px, auto;
    background-blend-mode: soft-light;
    border-bottom-right-radius: 32px;
    box-shadow: 0 24px 48px -30px rgba(11, 31, 51, .6);
}

.estc-pres__facts li {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 30px 34px;
}

.estc-pres__facts li + li {
    border-left: 1px solid rgba(255, 255, 255, .14);
}

.estc-pres__facts strong {
    font-family: var(--estc-font-heading);
    font-size: 44px;
    font-weight: 500;
    line-height: 1;
    color: #fff;
}

.estc-pres__facts span {
    font-family: var(--estc-font-body);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #e2c46a;
}

/* ---- Sections ---- */
.estc-pres__sections {
    padding: 88px 0 96px;
}

.estc-pres__sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
    gap: 32px;
    align-items: start;
}

.estc-pres__card {
    position: relative;
    padding: 44px 44px 40px;
    background: #fff;
    border-top-right-radius: 28px;
    box-shadow: 0 1px 0 rgba(11, 31, 51, .06), 0 18px 40px -28px rgba(11, 31, 51, .35);
}

/* Gold accent bar, as on the department cards */
.estc-pres__card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 56px;
    height: 3px;
    background: #c9a227;
    transition: width .6s cubic-bezier(.16, 1, .3, 1);
}

.estc-pres__card:hover::before {
    width: 100%;
}

.estc-pres__num {
    display: block;
    margin-bottom: 18px;
    font-family: var(--estc-font-heading);
    font-size: 15px;
    letter-spacing: .12em;
    color: var(--estc-primary);
}

/* Editors type these headings in capitals (without accents): keep them as small caps labels */
.estc-pres__card-title {
    margin: 0 0 20px;
    font-family: var(--estc-font-body);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .14em;
    line-height: 1.5;
    text-transform: uppercase;
    color: var(--estc-heading);
}

.estc-pres__card p {
    margin: 0 0 16px;
    font-size: 16.5px;
    line-height: 1.9;
    color: var(--estc-text);
}

.estc-pres__card p {
    max-width: 860px;
}

.estc-pres__card p:last-child {
    margin-bottom: 0;
}

/* Inline " - " items become a short vertical timeline */
.estc-pres__steps {
    position: relative;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.estc-pres__steps::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 20px;
    bottom: 20px;
    width: 1px;
    background: var(--estc-border);
}

.estc-pres__steps li {
    position: relative;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.estc-pres__steps li + li {
    margin-top: 20px;
}

.estc-pres__step-num {
    flex: 0 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    border-radius: 50%;
    background: var(--estc-primary);
    box-shadow: 0 0 0 5px #fff;
    font-family: var(--estc-font-heading);
    font-size: 17px;
    color: #fff;
}

.estc-pres__steps p {
    flex: 1;
    margin: 0;
    padding: 14px 18px;
    background: var(--estc-primary-light);
    border-top-right-radius: 16px;
    font-size: 15.5px;
    line-height: 1.75;
}

/* ---- Trainings band: formation initiale / continue and their diplomas ---- */
.estc-pres__trainings {
    position: relative;
    overflow: hidden;
    padding: 88px 0 96px;
    background: var(--estc-secondary);
    color: #fff;
}

.estc-pres__trainings::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, .06);
    -webkit-mask: url('../../images/patterns/pattern_05.png') center / 120px repeat;
    mask: url('../../images/patterns/pattern_05.png') center / 120px repeat;
    pointer-events: none;
}

.estc-pres__trainings .estc-container {
    position: relative;
}

.estc-pres__trainings-title {
    margin: 0 0 48px;
    font-family: var(--estc-font-heading);
    font-size: 40px;
    font-weight: 500;
    line-height: 1.2;
    color: #fff;
}

.estc-pres__trainings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
    gap: 32px;
    align-items: start;
}

.estc-pres__training {
    display: flex;
    flex-direction: column;
    padding: 36px 36px 32px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .12);
    border-top: 3px solid #c9a227;
    border-top-right-radius: 28px;
}

.estc-pres__training-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 14px;
    font-family: var(--estc-font-heading);
    font-size: 28px;
    font-weight: 500;
    color: #fff;
}

/* Gold ring holding the training's icon (graduation cap / briefcase) */
.estc-pres__training-icon {
    flex: 0 0 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(201, 162, 39, .6);
    background: rgba(201, 162, 39, .12);
    font-size: 20px;
    color: #e2c46a;
}

.estc-pres__training-text {
    margin: 0 0 24px;
    font-size: 16px;
    line-height: 1.8;
    color: rgba(255, 255, 255, .75);
}

.estc-pres__diplomas {
    margin: 0;
    padding: 0;
    list-style: none;
}

.estc-pres__diploma {
    display: flex;
    gap: 22px;
    align-items: flex-start;
    padding: 22px 0;
    border-top: 1px solid rgba(255, 255, 255, .14);
}

/* Acronym tile: gold on navy, the shape of the site's cards */
.estc-pres__diploma-code {
    flex: 0 0 76px;
    padding: 12px 0;
    background: rgba(201, 162, 39, .12);
    border: 1px solid rgba(201, 162, 39, .5);
    border-top-right-radius: 14px;
    font-family: var(--estc-font-heading);
    font-size: 19px;
    font-weight: 600;
    letter-spacing: .06em;
    text-align: center;
    color: #e2c46a;
}

.estc-pres__diploma strong {
    display: block;
    margin-bottom: 6px;
    font-family: var(--estc-font-body);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .1em;
    line-height: 1.5;
    text-transform: uppercase;
    color: #fff;
}

.estc-pres__diploma p {
    margin: 0;
    font-size: 15.5px;
    line-height: 1.75;
    color: rgba(255, 255, 255, .8);
}

.estc-pres__training-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
    margin-top: 8px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, .14);
    width: 100%;
    font-family: var(--estc-font-heading);
    font-size: 18px;
    color: #fff;
    transition: color .25s, gap .25s;
}

.estc-pres__training-link i {
    font-size: 12px;
    color: #c9a227;
}

.estc-pres__training-link:hover,
.estc-pres__training-link:focus-visible {
    gap: 16px;
    color: #e2c46a;
}

/* ---- Other pages ---- */
.estc-pres__more {
    padding: 72px 0 96px;
}

.estc-pres__more-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

.estc-pres__more-grid a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 100%;
    padding: 24px 26px;
    background: #fff;
    border-top: 3px solid var(--estc-primary);
    box-shadow: 0 18px 40px -30px rgba(11, 31, 51, .4);
    font-family: var(--estc-font-heading);
    font-size: 19px;
    color: var(--estc-heading);
    transition: color .25s, transform .35s cubic-bezier(.16, 1, .3, 1), border-color .25s;
}

.estc-pres__more-grid a i {
    font-size: 12px;
    color: #c9a227;
    transition: transform .25s;
}

.estc-pres__more-grid a:hover,
.estc-pres__more-grid a:focus-visible {
    transform: translateY(-4px);
    border-color: #c9a227;
    color: var(--estc-primary);
}

.estc-pres__more-grid a:hover i {
    transform: translateX(4px);
}

/* ---- Responsive ---- */
@media (max-width: 1100px) {
    .estc-pres__intro-grid {
        gap: 56px;
    }

    .estc-pres__heading {
        font-size: 36px;
    }
}

@media (max-width: 860px) {
    .estc-pres__intro {
        padding: 56px 0 56px;
    }

    .estc-pres__intro-grid {
        grid-template-columns: 1fr;
        gap: 44px;
    }

    .estc-pres__figure {
        max-width: 560px;
    }

    .estc-pres__sections,
    .estc-pres__trainings {
        padding: 64px 0;
    }
}

@media (max-width: 640px) {
    .estc-pres__heading {
        margin-bottom: 24px;
        font-size: 29px;
    }

    .estc-pres__lead {
        font-size: 17px;
    }

    .estc-pres__lead::first-letter {
        font-size: 60px;
    }

    .estc-pres__text,
    .estc-pres__card p {
        font-size: 16px;
    }

    .estc-pres__facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .estc-pres__facts li {
        padding: 20px 18px;
    }

    .estc-pres__facts li:nth-child(odd) {
        border-left: 0;
    }

    .estc-pres__facts li:nth-child(n + 3) {
        border-top: 1px solid rgba(255, 255, 255, .14);
    }

    .estc-pres__facts strong {
        font-size: 30px;
    }

    .estc-pres__facts span {
        font-size: 10px;
        letter-spacing: .1em;
    }

    .estc-pres__card {
        padding: 32px 22px 28px;
    }

    .estc-pres__trainings-title {
        margin-bottom: 32px;
        font-size: 30px;
    }

    .estc-pres__training {
        padding: 28px 20px 24px;
    }

    .estc-pres__training-title {
        font-size: 23px;
    }

    .estc-pres__diploma {
        gap: 16px;
    }

    .estc-pres__diploma-code {
        flex-basis: 62px;
        font-size: 16px;
    }

    .estc-pres__more {
        padding: 56px 0 72px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .estc-pres__card::before,
    .estc-pres__more-grid a,
    .estc-pres__more-grid a i {
        transition: none;
    }
}
