/*
 * Page « About TRACY » (templates/app/about/index.html.twig).
 * Remplace la mise en page d'origine de dist/app/style/about-page.css
 * (classes .about-page-block…, qui ne sont plus utilisees par le gabarit).
 *
 * Structure :
 *   .ab-top          haut de page
 *     .ab-intro        fil d'Ariane, etiquette, titre et phrase d'accroche (sur le fond bleu)
 *     .ab-story        carte blanche : image + texte de presentation
 *   .ab-more         carte blanche : equipe et partenaires (seulement s'ils sont renseignes)
 *
 * Ordinateur (1200 px et plus) : .ab-intro a gauche, .ab-story a droite, et la
 * page occupe exactement la hauteur de l'ecran : pas de defilement tant que
 * l'equipe et les partenaires sont vides.
 * Telephone et tablette : les blocs s'empilent (titre, carte, phrase d'accroche).
 *
 * Fichier ecrit a la main (il ne passe pas par la compilation Sass du dossier assets/).
 */

.ab {
    --ab-blue: #0000b7;
    --ab-blue-light: #247bff;
    --ab-cyan: #1ac5ff;
    --ab-ink: #1c1f2a;
    --ab-muted: #5c5e61;
    --ab-line: #e4e8f3;
    --ab-radius: 22px;
    --ab-pad: 22px;
    padding-bottom: 80px;
}

.ab-container {
    position: relative;
    width: 100%;
    max-width: 1285px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ------------------------------------------------------------- haut de page */

/* Telephone et tablette : .ab-intro s'efface (display: contents) pour que ses
   elements et la carte s'ordonnent librement dans une seule colonne. */
.ab-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

.ab-intro {
    display: contents;
}

.ab .breadcrumb {
    order: 1;
    margin-bottom: 22px;
}

.ab .breadcrumb__container {
    max-width: none;
    padding: 0;
}

.ab-intro__eyebrow {
    order: 2;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 7px 14px 7px 12px;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, .12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28);
    color: #fff;
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ab-intro__eyebrow::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--ab-cyan);
}

.ab-intro__title {
    order: 3;
    max-width: 17ch;
    margin-bottom: 28px;
    color: #fff;
    font-size: clamp(1.875rem, 8.6vw, 2.25rem);
    font-weight: 300;
    line-height: 1.08;
    letter-spacing: -.01em;
    text-wrap: balance;
}

/* --------------------------------------------------------- phrase d'accroche */

.ab-highlight {
    order: 5;
    margin-top: 20px;
    padding: 22px 24px 24px;
    border-radius: calc(var(--ab-radius) - 6px);
    background-color: rgba(255, 255, 255, .1);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .26);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.ab-highlight::before {
    content: "";
    display: block;
    width: 34px;
    height: 3px;
    margin-bottom: 14px;
    border-radius: 3px;
    background-color: var(--ab-cyan);
}

.ab-highlight__text {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 300;
    line-height: 1.3;
    text-wrap: balance;
}

/* ------------------------------------------------------------------- cartes */

.ab-card {
    position: relative;
    padding: var(--ab-pad);
    border-radius: var(--ab-radius);
    background-color: #fff;
    box-shadow: 0 30px 60px -30px rgba(0, 0, 60, .55);
}

/* --------------------------------------------------- image + presentation */

.ab-story {
    order: 4;
    display: grid;
    gap: 24px;
}

.ab-story__pic {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border-radius: calc(var(--ab-radius) - 6px);
    background: linear-gradient(135deg, #0000b7, #247bff);
}

.ab-story__pic__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.ab-story__text {
    color: var(--ab-ink);
}

/* (!important : le texte saisi dans l'editeur peut porter ses propres styles) */
.ab-story__text p {
    padding-bottom: 18px !important;
    font-size: 1rem !important;
    line-height: 1.7 !important;
    color: var(--ab-ink) !important;
}

.ab-story__text p:first-child {
    color: var(--ab-blue) !important;
}

.ab-story__text p:last-child {
    padding-bottom: 0 !important;
}

/* ------------------------------------------------- equipe et partenaires */

.ab-more {
    margin-top: 28px;
}

.ab-section {
    margin-top: 40px;
    padding-top: 36px;
    border-top: 1px solid var(--ab-line);
}

.ab-more > .ab-section:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.ab-section__head {
    max-width: 640px;
    margin-bottom: 26px;
}

.ab-section__title {
    padding-bottom: 12px;
    color: var(--ab-blue);
    font-size: 1.625rem;
    font-weight: 300;
    line-height: 1.15;
}

.ab-section__text p {
    padding-bottom: 12px !important;
    font-size: 1rem !important;
    line-height: 1.7 !important;
    color: var(--ab-muted) !important;
}

.ab-section__text p:last-child {
    padding-bottom: 0 !important;
}

.ab-team__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 22px 18px;
}

.ab-team__pic {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    margin-bottom: 14px;
    border-radius: 16px;
    background-color: #eef1f9;
}

.ab-team__pic__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}

.ab-team__name {
    color: var(--ab-blue);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.ab-team__position {
    margin-top: 3px;
    color: var(--ab-muted);
    font-size: .875rem;
    line-height: 1.4;
}

.ab-partners__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
}

.ab-partners__item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 104px;
    padding: 20px;
    border-radius: 16px;
    box-shadow: inset 0 0 0 1px var(--ab-line);
    transition: box-shadow .3s, transform .3s;
}

.ab-partners__pic {
    display: block;
    line-height: 0;
}

.ab-partners__pic__img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 56px;
}

@media (hover: hover) {
    .ab-team__item:hover .ab-team__pic__img {
        transform: scale(1.04);
    }

    .ab-partners__item:hover {
        box-shadow: inset 0 0 0 1px var(--ab-blue-light), 0 14px 28px -18px rgba(0, 0, 183, .5);
        transform: translateY(-2px);
    }
}

/* ------------------------------------------------------------------ tablette */

@media (min-width: 850px) {
    .ab {
        --ab-radius: 32px;
        --ab-pad: 36px;
        padding-bottom: 110px;
    }

    .ab-intro__title {
        margin-bottom: 36px;
        font-size: 3.25rem;
    }

    .ab-story {
        grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
        gap: 40px;
    }

    /* Image en portrait, calee en haut de la colonne */
    .ab-story__pic {
        align-self: start;
        aspect-ratio: 4 / 5;
    }

    .ab-story__text {
        align-self: center;
    }

    .ab-highlight {
        margin-top: 24px;
        padding: 30px 36px 32px;
    }

    .ab-highlight__text {
        font-size: 1.625rem;
    }

    .ab-more {
        margin-top: 36px;
    }

    .ab-section {
        margin-top: 52px;
        padding-top: 48px;
    }

    .ab-section__title {
        font-size: 2rem;
    }

    .ab-team__list {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 30px 26px;
    }

    .ab-partners__list {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 18px;
    }
}

/* -------------------------------------------------------------------- bureau
   Presentation a gauche, carte a droite, dans la hauteur de l'ecran.
   58px = hauteur du pied de page (98px) moins son recouvrement (40px) : la
   page fait ainsi exactement la hauteur de la fenetre. Les tailles suivent la
   hauteur de l'ecran (unites vh) pour tenir aussi sur un portable. Si l'ecran
   est vraiment trop bas, le contenu deborde simplement et la page defile. */

@media (min-width: 1200px) {
    .ab {
        --ab-radius: 34px;
        --ab-pad: clamp(18px, 3.2vh, 32px);
        display: flex;
        flex-direction: column;
        min-height: calc(100vh - 58px);
        padding-bottom: calc(40px + clamp(14px, 3vh, 34px));
    }

    /* L'image de fond d'origine fait 750px de haut : on la limite a la hauteur
       de la page, sinon elle depasse et fait defiler un ecran bas. */
    .pages.ab::before {
        height: min(750px, 100%);
    }

    /* 104px = bas de l'en-tete fixe */
    .pages.ab {
        padding-top: calc(104px + clamp(12px, 3vh, 30px));
    }

    .ab-top {
        flex: 1 0 auto;
        grid-template-columns: minmax(0, 7fr) minmax(0, 13fr);
        gap: clamp(36px, 3.6vw, 60px);
        align-items: center;
    }

    .ab-intro {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .ab .breadcrumb {
        margin-bottom: clamp(14px, 2.6vh, 24px);
    }

    .ab-intro__eyebrow {
        margin-bottom: clamp(12px, 2.2vh, 20px);
    }

    .ab-intro__title {
        max-width: none;
        margin-bottom: 0;
        font-size: clamp(2rem, min(3.3vw, 6.6vh), 3.75rem);
    }

    .ab-highlight {
        align-self: stretch;
        margin-top: clamp(22px, 4.4vh, 44px);
        padding: clamp(18px, 3vh, 28px) 28px clamp(20px, 3.2vh, 30px);
    }

    .ab-highlight__text {
        font-size: clamp(1.125rem, 2.7vh, 1.5rem);
    }

    .ab-story {
        grid-template-columns: clamp(190px, 16vw, 250px) minmax(0, 1fr);
        gap: clamp(22px, 2.2vw, 36px);
    }

    /* L'image prend toute la hauteur du texte voisin */
    .ab-story__pic {
        align-self: stretch;
        aspect-ratio: auto;
        min-height: 0;
        border-radius: calc(var(--ab-radius) - 12px);
    }

    .ab-story__text p {
        padding-bottom: clamp(8px, 1.8vh, 18px) !important;
        font-size: clamp(.8125rem, 1.9vh, 1rem) !important;
        line-height: 1.6 !important;
    }

    .ab-more {
        margin-top: 44px;
    }

    .ab-section__title {
        font-size: 2.5rem;
    }
}

/* ------------------------------------------------------- apparition a l'arrivee */

@media (prefers-reduced-motion: no-preference) {
    .ab-intro__eyebrow,
    .ab-intro__title,
    .ab-story,
    .ab-highlight {
        animation: ab-rise .7s cubic-bezier(.2, .8, .2, 1) backwards;
    }

    .ab-intro__title {
        animation-delay: .08s;
    }

    .ab-story {
        animation-delay: .16s;
    }

    .ab-highlight {
        animation-delay: .26s;
    }

    @keyframes ab-rise {
        from { opacity: 0; transform: translateY(26px); }
        to   { opacity: 1; transform: translateY(0); }
    }
}
