:root {
    --blue: #203D91;
    --purple: #791981;
    --magenta: #A50B73;
    --orange: #DB6102;
    --yellow: #FAB200;
    --white: #F6FCFE;
    --cyan: #55BFDC;
    --ink: #17234b;
    --font: "Barlow", Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--white);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.5;
}

a { color: inherit; }
button, input, textarea { font: inherit; }
img, video { max-width: 100%; }

.skip-link {
    position: absolute;
    left: -9999px;
    top: 1rem;
    z-index: 2000;
    padding: .7rem;
    background: white;
}
.skip-link:focus { left: 1rem; }

/* Navigation fixe */
.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 1000;
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: .8rem clamp(1.2rem, 5vw, 5rem);
    background: rgba(246, 252, 254, .94);
    border-bottom: 1px solid rgba(32, 61, 145, .1);
    backdrop-filter: blur(16px);
}

.brand {
    display: inline-flex;
    flex-direction: column;
    line-height: .9;
    color: var(--blue);
    font-weight: 900;
    letter-spacing: -.06em;
    text-decoration: none;
}
.brand-main { font-size: 1.75rem; }
.brand-sub {
    margin-top: .35rem;
    font-size: .53rem;
    letter-spacing: .14em;
    font-weight: 700;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2.5vw, 2.6rem);
}
.main-nav a {
    color: var(--blue);
    font-size: .96rem;
    font-weight: 600;
    text-decoration: none;
}
.main-nav a:hover,
.main-nav a:focus-visible { color: var(--orange); }
.main-nav .nav-cta {
    padding: .7rem 1.65rem;
    border-radius: 99px;
    color: white;
    background: var(--cyan);
    font-weight: 800;
}
.menu-toggle { display: none; }

/* Hero vidéo */
.hero {
    position: relative;
    min-height: min(760px, 100svh);
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 8rem 1.5rem 5rem;
    color: white;
    background: var(--cyan);
}
.hero-video,
.hero-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.hero-video { object-fit: cover; }
.hero-overlay {
    background: linear-gradient(120deg, rgba(32, 61, 145, .72), rgba(85, 191, 220, .52));
}
.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    text-align: center;
}
.eyebrow {
    margin: 0 0 .8rem;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .2em;
}
.hero h1 {
    margin: 0;
    font-size: clamp(2.7rem, 8vw, 6.7rem);
    line-height: .98;
    font-weight: 900;
}
.hero-subtitle {
    margin: 1.5rem 0 2rem;
    font-size: clamp(1.1rem, 2vw, 1.45rem);
}
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .8rem;
    border: 0;
    border-radius: 99px;
    padding: .95rem 2rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
}
.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(10, 30, 80, .18);
}
.button-light { color: var(--blue); background: var(--white); }
.scroll-cue {
    position: absolute;
    z-index: 1;
    bottom: 1.5rem;
    left: 50%;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    transform: translateX(-50%);
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    text-decoration: none;
}

/* Sections et titres */
.section-light { background: var(--white); }
.stages,
.section-blue,
.section-cyan {
    padding: clamp(4rem, 8vw, 7rem) clamp(1.2rem, 7vw, 7rem);
}
.section-intro {
    max-width: 850px;
    margin: 0 auto 3rem;
    text-align: center;
}
.eyebrow-orange { color: var(--orange); }
.section-intro h2,
.practical h2 {
    margin: 0;
    color: var(--blue);
    font-size: clamp(2rem, 4.2vw, 3.5rem);
    line-height: 1.05;
    font-weight: 900;
}
.section-intro h2 span { color: var(--cyan); }
.section-intro-white h2,
.section-intro-white .eyebrow { color: white; }
.section-lead {
    margin: .8rem 0 0;
    color: rgba(255, 255, 255, .85);
    font-size: 1.08rem;
}

/* Cartes PAO et Multimédia */
.stage-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1.5rem, 4vw, 4rem);
    max-width: 1250px;
    margin: auto;
}
.stage-heading {
    min-height: 190px;
    padding: 0 .8rem 1.4rem;
    text-align: center;
}
.stage-number {
    color: var(--purple);
    font-size: .72rem;
    letter-spacing: .16em;
    font-weight: 800;
}
.stage-heading h3 {
    margin: .3rem 0 .5rem;
    color: var(--orange);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 900;
}
.stage-heading p {
    max-width: 520px;
    margin: 0 auto;
    color: #7c5a45;
}

/* Carrousels */
.carousel {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1.55 / 1;
    border-radius: 20px;
    background: #dcecf1;
}
.carousel-track { position: relative; width: 100%; height: 100%; }
.carousel-slide {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s ease;
}
.carousel-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}
.carousel-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.carousel-slide.is-missing {
    background:
        linear-gradient(160deg, rgba(32, 61, 145, .88), rgba(85, 191, 220, .75)),
        repeating-linear-gradient(-45deg, transparent, transparent 12px, rgba(255, 255, 255, .08) 12px, rgba(255, 255, 255, .08) 24px);
}
.carousel-slide.is-missing img { display: none; }
.carousel-slide.is-missing figcaption { background: none; }
.carousel-slide figcaption {
    position: absolute;
    inset: auto 0 0;
    padding: 2.2rem 1rem .8rem;
    color: white;
    font-size: .9rem;
    font-weight: 600;
    background: linear-gradient(transparent, rgba(0, 0, 0, .6));
}
.carousel-arrow {
    position: absolute;
    z-index: 2;
    top: 50%;
    width: 42px;
    height: 42px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 50%;
    color: var(--blue);
    background: rgba(246, 252, 254, .92);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}
.carousel-arrow.prev { left: 12px; }
.carousel-arrow.next { right: 12px; }
.carousel-dots {
    position: absolute;
    z-index: 3;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: .4rem;
}
.carousel-dots button {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .55);
    cursor: pointer;
}
.carousel-dots button[aria-current="true"] {
    transform: scale(1.25);
    background: white;
}
.exchange-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    max-width: 1250px;
    margin: 2rem auto 0;
    padding: 1.2rem 2rem;
    border-radius: 18px;
    color: white;
    background: var(--cyan);
    text-align: center;
}
.exchange-banner p { margin: 0; font-size: 1.08rem; font-weight: 600; }
.exchange-icon { font-size: 2rem; font-weight: 800; }

/* Programme */
.section-blue {
    color: white;
    background: var(--blue);
}
.learning-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5rem 4rem;
    max-width: 1100px;
    margin: auto;
}
.learning-item {
    display: grid;
    grid-template-columns: 112px 1fr;
    align-items: center;
    gap: 1.2rem;
}
.learning-icon {
    display: grid;
    width: 112px;
    aspect-ratio: 1;
    place-items: center;
    border-radius: 14px;
    color: var(--yellow);
    background: rgba(246, 252, 254, .18);
    font-size: 3rem;
    font-weight: 800;
}
.learning-item h3 {
    margin: 0 0 .35rem;
    color: white;
    font-size: 1.2rem;
}
.learning-item p {
    margin: 0;
    color: rgba(255, 255, 255, .84);
}

/* Les 3 étapes avant le formulaire */
.apply-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .8rem;
    max-width: 900px;
    margin: -1rem auto 1.4rem;
    padding: 0;
    list-style: none;
}
.apply-steps li {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    padding: 1rem 1.1rem;
    border-radius: 16px;
    color: var(--blue);
    background: rgba(255, 255, 255, .72);
}
.apply-steps strong { font-size: 1.02rem; }
.apply-steps span { color: #3d5278; font-size: .92rem; }

/* Formulaire */
.section-cyan { background: var(--cyan); }
.application-form {
    position: relative;
    max-width: 900px;
    margin: auto;
    padding: clamp(1.3rem, 4vw, 3.3rem);
    border: 1px solid rgba(32, 61, 145, .5);
    border-radius: 22px;
    background: var(--white);
    box-shadow: 0 18px 50px rgba(32, 61, 145, .12);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.field {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    margin-bottom: 1rem;
}
.field label,
.choice-field legend,
.upload-heading h3 {
    color: var(--blue);
    font-weight: 700;
}
.field label span,
.choice-field legend span,
.upload-field label span,
.consent span span { color: var(--magenta); }
.field input,
.field textarea {
    width: 100%;
    padding: .85rem 1rem;
    border: 1.5px solid var(--cyan);
    border-radius: 12px;
    outline: none;
    color: var(--ink);
    background: white;
}
.field input:focus,
.field textarea:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(121, 25, 129, .12);
}
.field textarea { min-height: 110px; resize: vertical; }
.choice-field {
    margin: 1.2rem 0 1.5rem;
    padding: 0;
    border: 0;
}
.choice-field legend { margin-bottom: .8rem; }
.radio-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .8rem;
}
.radio-card {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    min-height: 100%;
    padding: .95rem 1rem;
    border: 1.5px solid #b7dceb;
    border-radius: 14px;
    color: var(--purple);
    font-weight: 700;
    background: white;
    cursor: pointer;
}
.radio-card:has(input:checked) {
    border-color: var(--orange);
    background: #fff6ee;
    box-shadow: 0 8px 20px rgba(219, 97, 2, .12);
}
.radio-copy {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.radio-copy small {
    color: #596783;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.35;
}
.choice-result {
    margin: .9rem 0 0;
    color: var(--blue);
    font-weight: 700;
}
.radio-card input { position: absolute; opacity: 0; }
.custom-radio {
    display: inline-grid;
    width: 19px;
    height: 19px;
    place-items: center;
    border: 2px solid var(--purple);
    border-radius: 50%;
}
.radio-card input:checked + .custom-radio::after {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--orange);
    content: "";
}
.radio-card input:focus-visible + .custom-radio {
    outline: 3px solid rgba(85, 191, 220, .55);
    outline-offset: 3px;
}
.upload-heading { margin: 1.5rem 0 .8rem; }
.upload-heading h3 { margin: 0; }
.upload-heading p,
.privacy-note,
.required-note {
    color: #596783;
    font-size: .88rem;
}
.upload-heading p { margin: .2rem 0 0; }
.upload-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .8rem;
    margin-bottom: 1rem;
}
.upload-field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: .45rem;
    padding: .85rem;
    border: 1px dashed var(--blue);
    border-radius: 12px;
    background: white;
}
.upload-field label { color: var(--blue); font-weight: 700; }
.upload-field input { width: 100%; max-width: 100%; font-size: .8rem; }
.upload-field input::file-selector-button {
    padding: .45rem .6rem;
    border: 0;
    border-radius: 8px;
    color: var(--blue);
    background: #e5f5fa;
    font: 600 .8rem var(--font);
    cursor: pointer;
}
.file-name {
    color: #69758c;
    font-size: .76rem;
    overflow-wrap: anywhere;
}
.consent {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    margin: 1rem 0 .4rem;
    color: var(--blue);
    font-size: .92rem;
}
.consent input {
    flex: 0 0 auto;
    margin-top: .25rem;
    accent-color: var(--purple);
}
.privacy-note { margin: .4rem 0 1.2rem; }
.form-feedback {
    display: none;
    margin: 1rem 0;
    padding: .8rem 1rem;
    border-radius: 10px;
    font-weight: 600;
}
.form-feedback.is-visible { display: block; }
.form-feedback.success { color: #155b35; background: #e1f5e9; }
.form-feedback.error { color: #8a1c36; background: #fde8ed; }
.submit-button {
    display: flex;
    min-width: 230px;
    margin: 1.4rem auto .4rem;
    color: white;
    background: var(--cyan);
}
.submit-button:disabled { opacity: .65; cursor: wait; }
.required-note { margin: .7rem 0 0; text-align: center; }
.optional { color: #78839a; font-size: .85em; font-weight: 400; }
.hp-field {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* Informations pratiques et pied de page */
.practical {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    align-items: center;
    gap: 4rem;
    padding: clamp(4rem, 7vw, 6rem) clamp(1.2rem, 10vw, 10rem);
}
.practical-copy > p:not(.eyebrow) { max-width: 560px; color: #596783; }
.text-link,
.practical-card a {
    color: var(--purple);
    font-weight: 800;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}
.practical-card {
    padding: 2rem;
    border: 1px solid rgba(85, 191, 220, .5);
    border-radius: 20px;
    background: #e7f7fb;
}
.practical-symbol { color: var(--orange); font-size: 2.4rem; }
.practical-card h3 { margin: .3rem 0; color: var(--blue); font-size: 1.5rem; }
.practical-card p { color: #596783; }
.contact-placeholder { margin-bottom: 0; font-size: .85rem; }
.site-footer {
    display: grid;
    grid-template-columns: 1.1fr 1.2fr 1fr 1fr;
    align-items: center;
    gap: 2rem;
    padding: 2rem clamp(1.2rem, 5vw, 5rem);
    color: white;
    background: var(--blue);
}
.brand-footer { color: white; }
.footer-thanks { margin: 0; font-size: .95rem; line-height: 1.35; }
.footer-links { display: flex; flex-direction: column; gap: .2rem; }
.footer-links h2 { margin: 0 0 .25rem; font-size: 1rem; }
.footer-links a {
    color: rgba(255, 255, 255, .82);
    font-size: .9rem;
    text-decoration: none;
}
.copyright {
    margin: 0;
    color: rgba(255, 255, 255, .85);
    font-size: .88rem;
    text-align: right;
}

/* Adaptation tablette */
@media (max-width: 850px) {
    .site-header { min-height: 68px; }
    .menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        padding: .5rem;
        border: 0;
        background: transparent;
        cursor: pointer;
    }
    .menu-toggle span { width: 25px; height: 2px; background: var(--blue); }
    .main-nav {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: .5rem 1.2rem 1.2rem;
        border-bottom: 1px solid rgba(32, 61, 145, .12);
        background: var(--white);
    }
    .main-nav.is-open { display: flex; }
    .main-nav a { padding: .8rem .4rem; }
    .main-nav .nav-cta { margin-top: .4rem; text-align: center; }
    .stage-heading { min-height: 220px; }
    .learning-grid { gap: 2rem; }
    .learning-item { grid-template-columns: 82px 1fr; }
    .learning-icon { width: 82px; font-size: 2.4rem; }
    .site-footer { grid-template-columns: 1fr 1fr; }
    .copyright { text-align: left; }
}

/* Adaptation mobile */
@media (max-width: 620px) {
    body { font-size: 16px; }
    .hero { min-height: 680px; }
    .hero h1 { font-size: clamp(2.5rem, 13vw, 4.5rem); }
    .stage-grid,
    .learning-grid,
    .practical { grid-template-columns: 1fr; }
    .stage-heading { min-height: 0; padding-bottom: 1.3rem; }
    .stage-card + .stage-card { margin-top: 1.2rem; }
    .carousel { aspect-ratio: 1.2 / 1; }
    .exchange-banner { align-items: flex-start; padding: 1rem; }
    .exchange-banner p { font-size: .98rem; text-align: left; }
    .learning-item { grid-template-columns: 76px 1fr; gap: 1rem; }
    .learning-icon { width: 76px; }
    .form-row,
    .upload-grid,
    .apply-steps,
    .radio-options { grid-template-columns: 1fr; }
    .radio-options { gap: .8rem; }
    .application-form { padding: 1.2rem; }
    .practical { gap: 2rem; }
    .site-footer { grid-template-columns: 1fr 1fr; gap: 1.5rem 1rem; }
    .brand-main { font-size: 1.5rem; }
}

/* Respecte le réglage système de réduction des animations. */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}
