
/* =========================================================
   FORMATIONS — CIME
   Style cohérent avec la rubrique ACTIVITÉS
   ========================================================= */


/* =========================================================
   DEUXIÈME HEADER
   ========================================================= */

.formation-intro {
    background: #f4f7fb;
    padding: 78px 7% 72px;
    border-bottom: 1px solid #e2e8f0;
    text-align: center;
}

.formation-intro-content {
    max-width: 1000px;
    margin: 0 auto;
}

.formation-label {
    display: inline-block;
    margin-bottom: 20px;
    color: #1769aa;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
}

.formation-intro h1 {
    margin: 0 0 20px;
    color: #142f52;
    font-size: 68px;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -1.5px;
}

.formation-intro p {
    max-width: 900px;
    margin: 0 auto;
    color: #4e6784;
    font-size: 20px;
    line-height: 1.6;
}


/* =========================================================
   SECTION FORMATIONS
   ========================================================= */

.formations-section {
    padding: 82px 7% 100px;
    background: #ffffff;
}


/* =========================================================
   INTRODUCTION
   ========================================================= */

.formations-title {
    max-width: 900px;
    margin: 0 auto 52px;
}

.formations-title .section-label {
    display: inline-block;
    margin-bottom: 18px;
    color: #b51f18;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.formations-title h2 {
    margin: 0 0 18px;
    color: #142f52;
    font-size: 34px;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.formations-title p {
    max-width: 750px;
    margin: 0;
    color: #4e6784;
    font-size: 16px;
    line-height: 1.75;
}


/* =========================================================
   GRILLE DES FORMATIONS
   ========================================================= */

.formations-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}


/* =========================================================
   CARTE
   ========================================================= */

.formation-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 440px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e1e8f0;
    border-top: 3px solid #142f52;
    box-shadow: 0 8px 25px rgba(20, 47, 82, 0.06);
    text-decoration: none;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

a.formation-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(20, 47, 82, 0.10);
    border-top-color: #b51f18;
}

a.formation-card:focus-visible {
    outline: 3px solid #1769aa;
    outline-offset: 3px;
}


/* =========================================================
   IMAGE DES CARTES
   ========================================================= */

.formation-card-image {
    width: 100%;
    height: 190px;
    overflow: hidden;
    background: #f4f7fb;
}

.formation-card-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease;
}

a.formation-card:hover .formation-card-image img {
    transform: scale(1.025);
}


/* =========================================================
   CONTENU DES CARTES
   ========================================================= */

.formation-card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 27px 25px 25px;
}

.formation-card-content h3 {
    margin: 0 0 15px;
    color: #142f52;
    font-size: 22px;
    line-height: 1.3;
    font-weight: 700;
}

.formation-card-content p {
    margin: 0;
    color: #4e6784;
    font-size: 15px;
    line-height: 1.7;
}


/* =========================================================
   LIEN ENTRER
   ========================================================= */

.formation-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin-top: auto;
    padding-top: 25px;
    color: #142f52;
    font-size: 14px;
    font-weight: 700;
    transition: color 0.2s ease, gap 0.2s ease;
}

.formation-more span {
    font-size: 17px;
    line-height: 1;
}

a.formation-card:hover .formation-more {
    color: #b51f18;
    gap: 12px;
}


/* =========================================================
   CARTES VIDES
   ========================================================= */

.formation-empty {
    cursor: default;
}

.formation-empty:hover {
    transform: none;
    border-top-color: #142f52;
    box-shadow: 0 8px 25px rgba(20, 47, 82, 0.06);
}

.formation-empty-image {
    width: 100%;
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f7fb;
    color: #9aabba;
    font-size: 38px;
    font-weight: 300;
}


/* =========================================================
   PAGE DÉTAIL
   ========================================================= */

.detail-container {
    max-width: 1050px;
    margin: 0 auto;
    padding: 55px 30px 100px;
}


/* =========================================================
   LIEN RETOUR
   ========================================================= */

.detail-back {
    display: inline-block;
    margin-bottom: 30px;
    color: #142f52;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}

.detail-back:hover {
    color: #b51f18;
}


/* =========================================================
   PHOTO PRINCIPALE
   ========================================================= */

.detail-cover {
    width: 100%;
    max-width: 900px;
    height: 330px;
    margin: 0 auto 45px;
    overflow: hidden;
    background: #f4f7fb;
    border: 1px solid #e1e8f0;
}

.detail-cover img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}


/* =========================================================
   TEXTE DÉTAILLÉ
   ========================================================= */

.detail-text {
    max-width: 850px;
    margin: 0 auto;
}

.detail-info {
    margin-bottom: 18px;
    color: #b51f18;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
}

.detail-text h1 {
    margin: 0 0 25px;
    color: #142f52;
    font-size: 42px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.detail-text p {
    margin: 0 0 20px;
    color: #4e6784;
    font-size: 16px;
    line-height: 1.8;
}

.detail-description-second {
    margin-top: 20px;
}


/* =========================================================
   GALERIE PHOTOS
   ========================================================= */

.detail-gallery {
    max-width: 900px;
    margin: 55px auto 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.detail-gallery figure {
    min-width: 0;
    margin: 0;
}

.detail-gallery img {
    width: 100%;
    height: 260px;
    display: block;
    object-fit: cover;
    border: 1px solid #e1e8f0;
}


/* =========================================================
   LÉGENDES DES PHOTOS
   ========================================================= */

.detail-gallery figcaption {
    margin-top: 10px;
    color: #4e6784;
    font-size: 13px;
    line-height: 1.5;
}


/* =========================================================
   TABLETTE
   ========================================================= */

@media (max-width: 1100px) {
    .formations-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .formation-intro h1 {
        font-size: 54px;
    }

    .detail-cover {
        height: 310px;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 760px) {
    .formation-intro {
        padding: 60px 6% 58px;
    }

    .formation-label {
        font-size: 13px;
        letter-spacing: 2px;
        margin-bottom: 17px;
    }

    .formation-intro h1 {
        font-size: 42px;
        line-height: 1.12;
        letter-spacing: -0.8px;
        margin-bottom: 17px;
    }

    .formation-intro p {
        font-size: 17px;
        line-height: 1.6;
    }

    .formations-section {
        padding: 62px 6% 75px;
    }

    .formations-title {
        margin-bottom: 38px;
    }

    .formations-title h2 {
        font-size: 30px;
    }

    .formations-title p {
        font-size: 15px;
        line-height: 1.7;
    }

    .formations-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .formation-card {
        min-height: 400px;
    }

    .formation-card-image,
    .formation-empty-image {
        height: 200px;
    }

    .formation-card-content {
        padding: 25px 23px 23px;
    }

    .formation-card-content h3 {
        font-size: 21px;
    }

    /* DÉTAIL */

    .detail-container {
        padding: 45px 6% 75px;
    }

    .detail-cover {
        height: 260px;
        margin-bottom: 35px;
    }

    .detail-text h1 {
        font-size: 34px;
    }

    .detail-text p {
        font-size: 15px;
        line-height: 1.75;
    }

    .detail-gallery {
        grid-template-columns: 1fr;
        gap: 22px;
        margin-top: 42px;
    }

    .detail-gallery img {
        height: 250px;
    }
}


/* =========================================================
   PETITS ÉCRANS
   ========================================================= */

@media (max-width: 420px) {
    .formation-intro {
        padding: 50px 5% 50px;
    }

    .formation-intro h1 {
        font-size: 35px;
    }

    .formation-intro p {
        font-size: 16px;
    }

    .formations-section {
        padding: 52px 5% 65px;
    }

    .formations-title h2 {
        font-size: 27px;
    }

    .formation-card-content {
        padding: 23px 20px 21px;
    }

    .detail-container {
        padding: 35px 5% 65px;
    }

    .detail-cover {
        height: 220px;
    }

    .detail-text h1 {
        font-size: 30px;
    }

    .detail-gallery img {
        height: 220px;
    }
}
