/**
 * OOI Platform V1 — Parcours public d’une Identité
 */


/* =========================================================
   CONTENEUR GÉNÉRAL
========================================================= */

.ooi-identity-history {
    position: relative;
    width: 100%;
    padding: clamp(26px, 4vw, 48px);
    overflow: hidden;
    border: 1px solid rgba(114, 112, 172, .16);
    border-radius: 24px;
    background:
        radial-gradient(
            circle at 100% 0,
            rgba(128, 197, 207, .10),
            transparent 30%
        ),
        #ffffff;
    box-shadow:
        0 18px 48px rgba(7, 20, 38, .08),
        0 4px 12px rgba(7, 20, 38, .03);
}

.ooi-identity-history::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(
        90deg,
        #7270AC,
        #80C5CF,
        #AACF80
    );
    content: "";
}


/* =========================================================
   EN-TÊTE
========================================================= */

.ooi-identity-history__header {
    max-width: 680px;
    margin-bottom: 34px;
}

.ooi-identity-history__eyebrow {
    display: block;
    margin-bottom: 7px;
    color: #7270AC;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .11em;
    line-height: 1.3;
    text-transform: uppercase;
}

.ooi-identity-history__title {
    margin: 0;
    color: #071426;
    font-size: clamp(28px, 3vw, 40px);
    font-weight: 750;
    line-height: 1.08;
}

.ooi-identity-history__description {
    margin: 10px 0 0;
    color: rgba(7, 20, 38, .64);
    font-size: 15px;
    line-height: 1.6;
}


/* =========================================================
   FRISE
========================================================= */

.ooi-identity-history__timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding-left: 36px;
}

.ooi-identity-history__timeline::before {
    position: absolute;
    top: 18px;
    bottom: 18px;
    left: 9px;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(
        180deg,
        rgba(114, 112, 172, .52),
        rgba(128, 197, 207, .42),
        rgba(170, 207, 128, .36)
    );
    content: "";
}


/* =========================================================
   CARTE D’UN MOMENT
========================================================= */

.ooi-identity-history__card {
    position: relative;
    display: grid;
    grid-template-columns: 158px minmax(0, 1fr);
    gap: 24px;
    min-width: 0;
    padding: 18px;
    overflow: visible;
    border: 1px solid rgba(7, 20, 38, .08);
    border-radius: 20px;
    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, .98),
            rgba(248, 250, 252, .98)
        );
    box-shadow:
        0 8px 22px rgba(7, 20, 38, .045);
    transition:
        transform .20s ease,
        box-shadow .20s ease,
        border-color .20s ease;
}

.ooi-identity-history__card::before {
    position: absolute;
    top: 30px;
    left: -35px;
    z-index: 2;
    width: 17px;
    height: 17px;
    box-sizing: border-box;
    border: 4px solid #ffffff;
    border-radius: 50%;
    background: #7270AC;
    box-shadow:
        0 0 0 2px rgba(114, 112, 172, .23),
        0 4px 10px rgba(7, 20, 38, .10);
    content: "";
}

.ooi-identity-history__card::after {
    position: absolute;
    top: 38px;
    left: -18px;
    width: 18px;
    height: 2px;
    background: rgba(114, 112, 172, .22);
    content: "";
}

.ooi-identity-history__card:hover {
    transform: translateY(-3px);
    border-color: rgba(114, 112, 172, .26);
    box-shadow:
        0 16px 36px rgba(7, 20, 38, .09),
        0 5px 14px rgba(7, 20, 38, .04);
}


/* =========================================================
   VISUEL DU MOMENT
========================================================= */

.ooi-identity-history__visual {
    position: relative;
    width: 158px;
    height: 158px;
    overflow: hidden;
    border-radius: 17px;
    background: #071426;
    box-shadow:
        0 10px 24px rgba(7, 20, 38, .13);
}

.ooi-identity-history__image {
    display: block;
    width: 100% !important;
    height: 100% !important;
    margin: 0;
    object-fit: cover;
    object-position: center;
    transition: transform .28s ease;
}

.ooi-identity-history__card:hover
.ooi-identity-history__image {
    transform: scale(1.035);
}

.ooi-identity-history__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(
            circle at 72% 18%,
            rgba(128, 197, 207, .28),
            transparent 44%
        ),
        linear-gradient(
            145deg,
            #071426,
            #26354a
        );
    color: rgba(255, 255, 255, .78);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: .05em;
}


/* =========================================================
   CONTENU
========================================================= */

.ooi-identity-history__content {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.ooi-identity-history__meta-top {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    margin-bottom: 8px;
}

.ooi-identity-history__branch {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(114, 112, 172, .12);
    color: #5b5996;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .055em;
    line-height: 1.2;
    text-transform: uppercase;
}

.ooi-identity-history__date {
    color: rgba(7, 20, 38, .56);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.3;
}

.ooi-identity-history__moment-title {
    margin: 0;
    color: #071426;
    font-size: clamp(22px, 2.3vw, 30px);
    font-weight: 750;
    line-height: 1.12;
    overflow-wrap: anywhere;
}

.ooi-identity-history__moment-title a {
    color: inherit;
    text-decoration: none;
    transition: color .18s ease;
}

.ooi-identity-history__moment-title a:hover,
.ooi-identity-history__moment-title a:focus-visible {
    color: #7270AC;
}

.ooi-identity-history__location {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    margin-top: 9px;
    color: rgba(7, 20, 38, .65);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.4;
}


/* =========================================================
   BADGES DE RÔLES
========================================================= */

.ooi-identity-history__roles {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 15px;
}

.ooi-identity-history__role {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(114, 112, 172, .12);
    color: #5b5996;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    line-height: 1.2;
    text-transform: uppercase;
}

.ooi-identity-history__role--therapeute {
    background: rgba(255, 171, 78, .17);
    color: #955812;
}

.ooi-identity-history__role--formateur {
    background: rgba(217, 158, 130, .17);
    color: #8a4c35;
}

.ooi-identity-history__role--organisateur,
.ooi-identity-history__role--coordinateur {
    background: rgba(114, 112, 172, .14);
    color: #56548e;
}

.ooi-identity-history__role--communication {
    background: rgba(128, 197, 207, .19);
    color: #26717a;
}

.ooi-identity-history__role--photographe {
    background: rgba(217, 158, 130, .19);
    color: #8c5138;
}

.ooi-identity-history__role--partenaire,
.ooi-identity-history__role--sponsor {
    background: rgba(170, 207, 128, .21);
    color: #55742f;
}

.ooi-identity-history__role--benevole {
    background: rgba(255, 171, 78, .13);
    color: #91540f;
}


/* =========================================================
   APPORTS
========================================================= */

.ooi-identity-history__contributions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin: 15px 0 0;
    padding: 0;
    list-style: none;
}

.ooi-identity-history__contribution {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 5px 9px;
    align-items: baseline;
    width: 100%;
    padding-top: 8px;
    border-top: 1px solid rgba(7, 20, 38, .07);
    color: rgba(7, 20, 38, .66);
    font-size: 13px;
    line-height: 1.5;
}

.ooi-identity-history__contribution:first-child {
    padding-top: 0;
    border-top: 0;
}

.ooi-identity-history__contribution strong {
    color: #071426;
    font-weight: 800;
}


/* =========================================================
   ERREUR
========================================================= */

.ooi-identity-history-error {
    padding: 14px 16px;
    border: 1px solid #D99E82;
    border-radius: 12px;
    background: #fff8f4;
}


/* =========================================================
   ACCESSIBILITÉ
========================================================= */

.ooi-identity-history a:focus-visible {
    outline: 3px solid rgba(128, 197, 207, .50);
    outline-offset: 3px;
    border-radius: 4px;
}


/* =========================================================
   TABLETTE
========================================================= */

@media screen and (max-width: 820px) {

    .ooi-identity-history {
        padding: 28px 24px;
    }

    .ooi-identity-history__timeline {
        padding-left: 30px;
    }

    .ooi-identity-history__card {
        grid-template-columns: 132px minmax(0, 1fr);
        gap: 20px;
    }

    .ooi-identity-history__visual {
        width: 132px;
        height: 132px;
    }

    .ooi-identity-history__moment-title {
        font-size: 24px;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media screen and (max-width: 640px) {

    .ooi-identity-history {
        padding: 24px 18px;
        border-radius: 20px;
    }

    .ooi-identity-history__header {
        margin-bottom: 26px;
        text-align: center;
    }

    .ooi-identity-history__title {
        font-size: 30px;
    }

    .ooi-identity-history__description {
        font-size: 14px;
    }

    .ooi-identity-history__timeline {
        gap: 18px;
        padding-left: 0;
    }

    .ooi-identity-history__timeline::before,
    .ooi-identity-history__card::before,
    .ooi-identity-history__card::after {
        display: none;
    }

    .ooi-identity-history__card {
        grid-template-columns: 1fr;
        gap: 17px;
        padding: 15px;
        border-radius: 18px;
    }

    .ooi-identity-history__visual {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        border-radius: 15px;
    }

    .ooi-identity-history__content {
        align-items: center;
        text-align: center;
    }

    .ooi-identity-history__meta-top,
    .ooi-identity-history__roles {
        justify-content: center;
    }

    .ooi-identity-history__moment-title {
        font-size: 25px;
        text-align: center;
    }

    .ooi-identity-history__location {
        justify-content: center;
        text-align: center;
    }

    .ooi-identity-history__contributions {
        margin-top: 14px;
    }

    .ooi-identity-history__contribution {
        display: flex;
        flex-direction: column;
        gap: 2px;
        align-items: center;
        text-align: center;
    }
}


/* =========================================================
   TRÈS PETITS ÉCRANS
========================================================= */

@media screen and (max-width: 390px) {

    .ooi-identity-history {
        padding: 22px 14px;
    }

    .ooi-identity-history__card {
        padding: 13px;
    }

    .ooi-identity-history__title {
        font-size: 27px;
    }

    .ooi-identity-history__moment-title {
        font-size: 22px;
    }

    .ooi-identity-history__branch,
    .ooi-identity-history__role {
        font-size: 9px;
    }
}


/* =========================================================
   ANIMATIONS RÉDUITES
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .ooi-identity-history__card,
    .ooi-identity-history__image,
    .ooi-identity-history__moment-title a {
        transition: none;
    }

    .ooi-identity-history__card:hover,
    .ooi-identity-history__card:hover
    .ooi-identity-history__image {
        transform: none;
    }
}