/* ========================================
   PAGE CHARTE
======================================== */

.charte-page {
    width: min(
        900px,
        calc(100% - 40px)
    );

    margin: 0 auto;

    padding: 45px 0 90px;
}


/* ========================================
   ACCORDÉONS
======================================== */

.charte-accordions {
    border-top: 1px solid var(--border);
}


.charte-item {
    border-bottom: 1px solid var(--border);
}


/* enlève le triangle natif */

.charte-item summary {
    list-style: none;
}


.charte-item summary::-webkit-details-marker {
    display: none;
}

.charte-summary-title {
    display: block;
}

/* ========================================
   TITRES DES 2 GRANDES PARTIES
======================================== */

.charte-item summary {
    position: relative;

    min-height: 82px;

    padding:
        18px
        54px
        18px
        24px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 25px;

    cursor: pointer;

    background:
        linear-gradient(
            90deg,
            rgba(118, 197, 107, .10),
            rgba(118, 197, 107, .025)
        );

    color: var(--green-dark);

    font-family: "Nunito Sans", sans-serif;
    font-size: 21px;
    font-weight: 850;
    line-height: 1.2;

    letter-spacing: -.45px;

    transition:
        background .18s ease,
        padding-left .18s ease;
}


/* barre verticale épaisse */

.charte-item summary::before {
    content: "";

    position: absolute;

    left: 0;
    top: 16px;
    bottom: 16px;

    width: 5px;

    background: var(--green-dark);

    border-radius: 6px;
}


/* ========================================
   SURVOL
======================================== */

.charte-item summary:hover {
    color: var(--green-dark);

    background:
        linear-gradient(
            90deg,
            rgba(118, 197, 107, .16),
            rgba(118, 197, 107, .04)
        );
}


/* ========================================
   PLUS / CROIX
======================================== */

.charte-plus {
    width: 25px;
    height: 25px;

    position: relative;

    flex: 0 0 25px;
}


.charte-plus::before,
.charte-plus::after {
    content: "";

    position: absolute;

    top: 50%;
    left: 50%;

    width: 18px;
    height: 2px;

    border-radius: 10px;

    background: var(--green-dark);

    transform:
        translate(-50%, -50%);

    transition:
        transform .2s ease,
        background .2s ease;
}


.charte-plus::after {
    transform:
        translate(-50%, -50%)
        rotate(90deg);
}


/* ========================================
   ÉTAT OUVERT
======================================== */

.charte-item[open] .charte-plus::before {
    transform:
        translate(-50%, -50%)
        rotate(45deg);
}


.charte-item[open] .charte-plus::after {
    transform:
        translate(-50%, -50%)
        rotate(-45deg);
}


.charte-item[open] > summary {
    color: var(--green-dark);

    background:
        linear-gradient(
            90deg,
            rgba(118, 197, 107, .13),
            rgba(118, 197, 107, .03)
        );
}


.charte-item[open] > summary:hover {
    color: var(--green-dark);
}


/* ========================================
   CONTENU OUVERT
======================================== */

.charte-content {
    max-width: 760px;

    padding:
        26px
        38px
        40px
        4px;
}


/* ========================================
   SOUS-PARTIES
======================================== */

.charte-subsection {
    margin: 0 0 34px;

    padding-left: 16px;

    border-left: 1px solid var(--green);
}


.charte-subsection:last-child {
    margin-bottom: 0;
}


/* ========================================
   SOUS-TITRES INTERNES
======================================== */

.charte-subsection h2 {
    margin:
        0
        0
        11px;

    color: var(--green-dark);

    font-family: "Nunito Sans", sans-serif;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.3;
}


/* ========================================
   PARAGRAPHES
======================================== */

.charte-subsection p {
    max-width: 720px;

    margin:
        0
        0
        18px;

    color: #4f5650;

    font-size: 16px;
    line-height: 1.75;
}


.charte-subsection p:last-child {
    margin-bottom: 0;
}


/* ========================================
   DATE FINALE
======================================== */

.charte-date {
    margin-top: 29px !important;

    color: var(--grey) !important;

    font-style: italic;
}


/* ========================================
   ACCESSIBILITÉ CLAVIER
======================================== */

.charte-item summary:focus-visible {
    outline: 3px solid rgba(105, 201, 90, .3);
    outline-offset: 5px;

    border-radius: 4px;
}


/* ========================================
   MOBILE
======================================== */

@media (max-width: 760px) {

    .charte-page {
        width: calc(100% - 32px);

        padding:
            32px
            0
            65px;
    }


    .charte-heading {
        margin-bottom: 38px;
    }


    .charte-kicker {
        margin-bottom: 15px;

        padding-left: 34px;

        font-size: 11px;

        letter-spacing: 1.5px;
    }


    .charte-kicker::before {
        width: 23px;
    }


    .charte-heading h1 {
        font-size: 48px;

        letter-spacing: -2.5px;
    }


    /* grands titres accordéon */

    .charte-item summary {
        min-height: 74px;

        padding:
            16px
            46px
            16px
            18px;

        gap: 18px;

        font-size: 19px;
        line-height: 1.17;
    }


    .charte-item summary::before {
        top: 14px;
        bottom: 14px;

        width: 4px;
    }

    .charte-plus {
        width: 23px;
        height: 23px;

        flex-basis: 23px;
    }


    .charte-plus::before,
    .charte-plus::after {
        width: 17px;
    }


    /* contenu */

    .charte-content {
        padding:
            22px
            12px
            32px
            2px;
    }


    .charte-subsection {
        margin-bottom: 28px;

        padding-left: 13px;

        border-left-width: 1px;
    }


    .charte-subsection h2 {
        margin-bottom: 10px;

        font-size: 16px;
    }


    .charte-subsection p {
        margin-bottom: 16px;

        font-size: 15px;
        line-height: 1.7;
    }

}