/* =====================================================================
   PAGE AUTEUR (préfixe .ath)
   Même harmonie que l'accueil et la lecture d'un événement :
   blanc / beige chaud, accent or, titres en serif.
   ===================================================================== */

.ath {
    --ath-ink: #111111;
    --ath-ink-2: #3a3a3a;
    --ath-muted: #727272;
    --ath-line: #e6e3dd;
    --ath-warm: #f7f6f2;
    --ath-gold: #cfa15c;
    --ath-gold-2: #a97d36;
    --ath-gold-soft: #f3e8d6;
    --ath-black: #030303;

    color: var(--ath-ink);
    background: #fff;
    overflow-x: clip;
}

.ath *,
.ath *::before,
.ath *::after {
    box-sizing: border-box;
    min-width: 0;
}

.ath a {
    text-decoration: none;
}

/* Pas de bandeau de titre vide entre le fil d'Ariane et le profil */
.internal-page-title-wrap--empty:has(+ #ath) {
    display: none;
}

/* =====================================================================
   PROFIL
   ===================================================================== */
.ath-profile {
    position: relative;
    padding: 56px 0 0;
    background: #fff;
}

/* Le bas du profil passe au beige sous la barre de statistiques */
.ath-profile::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 52px;
    background: var(--ath-warm);
}

.ath-profile > .container {
    position: relative;
    z-index: 1;
}

.ath-profile__grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 56px;
    align-items: start;
}

.ath-portrait {
    position: relative;
    padding: 10px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 30px 60px -26px rgba(0, 0, 0, .35), 0 0 0 1px rgba(0, 0, 0, .04);
}

.ath-portrait::after {
    content: "";
    position: absolute;
    right: -10px;
    bottom: -10px;
    z-index: -1;
    width: 60%;
    height: 60%;
    border: 2px solid var(--ath-gold);
    border-radius: 20px;
}

.ath-portrait img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 12px;
}

.ath-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    color: var(--ath-gold-2);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.ath-kicker::before {
    content: "";
    width: 18px;
    height: 2px;
    background: var(--ath-gold);
}

.ath-name {
    margin: 0 0 10px;
    color: var(--ath-ink);
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -.015em;
    text-wrap: balance;
}

.ath-location {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 4px;
    color: var(--ath-muted);
    font-size: 15px;
}

.ath-location i {
    color: var(--ath-gold);
}

/* Domaines d'expertise : étiquettes dorées sous le nom */
.ath-domains {
    margin: 18px 0 4px;
}

.ath-domains__label {
    display: block;
    margin-bottom: 10px;
    color: var(--ath-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.ath-domains ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ath-domains li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    color: var(--ath-ink);
    background: var(--ath-gold-soft);
    border: 1px solid #ecdcc0;
    border-radius: 999px;
    font-size: 14px;
    line-height: 1.2;
}

.ath-domains li::before {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--ath-gold);
    border-radius: 50%;
}

/* Biographie de l'auteur */
.ath-bio {
    position: relative;
    max-width: 760px;
    margin-top: 24px;
    color: var(--ath-ink-2);
    font-size: 18px;
    line-height: 1.75;
}

.ath-bio p {
    margin: 0 0 .9em;
}

.ath-bio p:last-child {
    margin-bottom: 0;
}

.ath-bio.is-clamped {
    max-height: 9.2em;
    overflow: hidden;
}

.ath-bio.is-clamped::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3.5em;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff);
}

.ath-bio__toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 0 0 2px;
    color: var(--ath-ink);
    background: none;
    border: 0;
    border-bottom: 2px solid var(--ath-gold);
    font-size: 14px;
    cursor: pointer;
}

.ath-bio__toggle i {
    transition: transform .2s ease;
}

.ath-bio__toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

/* Contacts */
.ath-contacts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

.ath-contacts a,
.ath-contacts span {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: var(--ath-ink-2) !important;
    background: #fff;
    border: 1px solid var(--ath-line);
    border-radius: 50%;
    font-size: 17px;
    transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}

.ath-contacts a:hover {
    color: var(--ath-black) !important;
    background: var(--ath-gold);
    border-color: var(--ath-gold);
    transform: translateY(-2px);
}

/* Statistiques */
.ath-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 52px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--ath-line);
    border-top: 3px solid var(--ath-gold);
    border-radius: 16px;
    box-shadow: 0 20px 44px -22px rgba(0, 0, 0, .2);
}

.ath-stat {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 16px;
    align-items: center;
    padding: 22px 28px;
    color: var(--ath-ink) !important;
    border-left: 1px solid var(--ath-line);
    transition: background .2s ease;
}

.ath-stat:first-child {
    border-left: 0;
}

.ath-stat i {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    color: var(--ath-gold-2);
    background: var(--ath-gold-soft);
    border-radius: 14px;
    font-size: 22px;
}

.ath-stat strong {
    color: var(--ath-ink);
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
}

.ath-stat span {
    color: var(--ath-muted);
    font-size: 13px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

a.ath-stat:hover {
    background: #fffaf1;
}

a.ath-stat:hover strong {
    color: var(--ath-gold-2);
}

.ath-stat.is-empty {
    opacity: .5;
}

/* =====================================================================
   CONTRIBUTIONS
   ===================================================================== */
.ath-works {
    padding: 64px 0 80px;
    background: var(--ath-warm);
    scroll-margin-top: 90px;
}

.ath .home-section__head.text-center {
    flex-direction: column;
    gap: 14px;
    margin-bottom: 28px;
}

/* Onglets en pastilles */
.ath-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 auto 36px;
}

.ath-tabs button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    color: var(--ath-ink-2);
    background: #fff;
    border: 1px solid var(--ath-line);
    border-radius: 999px;
    font-size: 14px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.ath-tabs button i {
    color: var(--ath-gold-2);
}

.ath-tabs button em {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    color: var(--ath-gold-2);
    background: var(--ath-gold-soft);
    border-radius: 999px;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

.ath-tabs button:hover {
    border-color: var(--ath-gold);
}

.ath-tabs button.is-active {
    color: #fff;
    background: var(--ath-black);
    border-color: var(--ath-black);
}

.ath-tabs button.is-active i {
    color: var(--ath-gold);
}

.ath-tabs button.is-active em {
    color: var(--ath-black);
    background: var(--ath-gold);
}

.ath-list {
    transition: opacity .2s ease;
}

.ath-list.is-loading {
    opacity: .45;
}

.ath-grid {
    display: grid;
    gap: 20px;
}

.ath-grid--biographies {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ath-grid--evenements,
.ath-grid--histoires {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Carte personnage */
.ath-person {
    display: grid;
    overflow: hidden;
    color: var(--ath-ink) !important;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .04);
    transition: transform .2s ease, box-shadow .2s ease;
}

.ath-person:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .3);
}

.ath-person__photo {
    display: block;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #ebe7df;
}

.ath-person__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.ath-person:hover .ath-person__photo img {
    transform: scale(1.04);
}

.ath-person__body {
    display: grid;
    gap: 3px;
    padding: 14px 16px 18px;
    border-top: 3px solid var(--ath-gold);
}

.ath-person__body strong {
    font-size: 17px;
    line-height: 1.25;
}

.ath-person__body small {
    color: var(--ath-ink-2);
    font-size: 13px;
}

.ath-person__body em {
    color: var(--ath-gold-2);
    font-size: 12px;
    font-style: normal;
}

/* Carte événement / histoire */
.ath-card {
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: hidden;
    color: var(--ath-ink) !important;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .04);
    transition: transform .2s ease, box-shadow .2s ease;
}

.ath-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .3);
}

.ath-card__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #ebe7df;
}

.ath-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.ath-card:hover .ath-card__media img {
    transform: scale(1.04);
}

.ath-card__date {
    position: absolute;
    left: 14px;
    bottom: 12px;
    padding: 3px 10px;
    color: var(--ath-black);
    background: var(--ath-gold);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.ath-card__body {
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 16px 18px 20px;
}

.ath-card__body small {
    color: var(--ath-gold-2);
    font-size: 12px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.ath-card__body strong {
    font-size: 19px;
    line-height: 1.3;
}

.ath-card__body em {
    display: -webkit-box;
    overflow: hidden;
    color: var(--ath-muted);
    font-size: 14px;
    font-style: normal;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.ath .biographies-page__pagination {
    margin-top: 36px;
}

.ath-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0;
    padding: 36px 20px;
    color: var(--ath-muted);
    background: #fff;
    border: 1px dashed #dcd5c8;
    border-radius: 16px;
    font-size: 16px;
}

.ath-empty i {
    color: var(--ath-gold);
}

/* Le site impose Poppins à tous les éléments (!important) : serif pour les titres */
#ath :is(.ath-name, .ath-bio, .ath-bio *, .ath-stat strong, .ath-person__body strong, .ath-card__body strong) {
    font-family: "Source Serif 4", Georgia, "Times New Roman", serif !important;
}

/* Liens en graisse normale, comme sur la lecture d'un événement */
#ath a,
#ath a * {
    font-weight: 400 !important;
}

#ath .ath-stat strong,
#ath .ath-person__body strong,
#ath .ath-card__body strong {
    font-weight: 600 !important;
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1199.98px) {
    .ath-profile__grid {
        grid-template-columns: 260px minmax(0, 1fr);
        gap: 40px;
    }

    .ath-grid--biographies {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .ath-grid--biographies {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ath-grid--evenements,
    .ath-grid--histoires {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ath-stat {
        padding: 18px 20px;
    }

    .ath-stat strong {
        font-size: 30px;
    }
}

@media (max-width: 767.98px) {
    .ath-profile {
        padding-top: 24px;
    }

    .ath-profile__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
        justify-items: center;
        text-align: center;
    }

    .ath-portrait {
        width: min(220px, 70vw);
    }

    .ath-kicker {
        justify-content: center;
    }

    .ath-location,
    .ath-domains ul,
    .ath-contacts {
        justify-content: center;
    }

    .ath-bio {
        margin-inline: auto;
        font-size: 17px;
        text-align: left;
    }

    .ath-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        margin-top: 36px;
    }

    .ath-stat {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        row-gap: 4px;
        padding: 16px 8px;
        text-align: center;
    }

    .ath-stat i {
        grid-row: auto;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .ath-stat strong {
        font-size: 26px;
    }

    .ath-stat span {
        font-size: 11px;
    }

    .ath-works {
        padding: 48px 0 60px;
    }

    .ath-grid--biographies {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .ath-grid--evenements,
    .ath-grid--histoires {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ath * {
        transition: none !important;
    }
}

/* Onglets des contributions */
.ath-contrib .ath-tabs {
    margin-bottom: 32px;
}

/* Photos des contributions moins hautes */
.ath-person__photo {
    aspect-ratio: 1 / 1;
}

.ath-person__photo img {
    object-position: center 20%;
}

.ath-card__media {
    aspect-ratio: 2 / 1;
}
