
/* ============================================
   SIREXE 2026
   SPEAKERS — FLAT PREMIUM DESIGN
============================================ */

:root {
    --sx-surface: #f8f8f5;
    --sx-white: #ffffff;
    --sx-border: #e3e6e1;
    --sx-muted: #727a73;
    --sx-text: #022d1c;
    --sx-skeleton: #e9ede8;
}

/* SECTION */
.sx-directory {
    padding-bottom: 5rem;
    background: var(--sx-surface);
    color: var(--secondary-dark);
}

/* BARRE DE FILTRES */
.sx-sticky {
    position: sticky;
    top: 0;
    z-index: 1020;
    padding: 1.125rem 0 0;
    background: rgba(248, 248, 245, .97);
    border-bottom: 1px solid var(--sx-border);
    box-shadow: none;
    backdrop-filter: blur(10px);
}

.sx-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.sx-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .625rem;
}

.sx-select {
    margin: 0;
}

/* CHAMPS PREMIUM */
.sx-select select,
.sx-search input {
    height: 46px;
    border: 1px solid #dfe4de;
    border-radius: 3px;
    background-color: var(--sx-white);
    color: var(--secondary-dark);
    font-family: var(--ff-source);
    font-size: .875rem;
    font-weight: 500;
    transition: border-color .2s ease,
                background-color .2s ease;
}

.sx-select select {
    min-width: 145px;
    padding: 0 2.25rem 0 .875rem;
    cursor: pointer;
}

.sx-select select:hover,
.sx-search input:hover {
    border-color: #9aab9e;
}

.sx-select select.is-active {
    border-color: var(--secondary);
    background-color: #f5faf6;
}

.sx-search {
    position: relative;
    flex: 0 1 280px;
    min-width: 190px;
    margin: 0;
}

.sx-search input {
    width: 100%;
    padding: 0 3rem 0 1rem;
}

.sx-search input::placeholder {
    color: #969d96;
    font-weight: 400;
}

.sx-search i {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    color: var(--secondary);
    pointer-events: none;
}

/* COMPTEUR */
.sx-count {
    padding: 1rem 0;
    margin: 0;
    color: var(--sx-muted);
    font-size: .8125rem;
    font-weight: 500;
}

/* RESET */
.sx-reset {
    padding: 0;
    border: 0;
    color: var(--secondary);
    background: transparent;
    font-family: var(--ff-source);
    font-size: .8125rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.sx-reset:hover {
    color: var(--secondary-dark);
    text-decoration: underline;
}

/* GRILLE */
.sx-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2.5rem 1.5rem;
    margin: 0;
    padding: 2.5rem 0 0;
    list-style: none;
}

.sx-grid__item[hidden] {
    display: none !important;
}

/* CARTES */
.sx-person {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--secondary-dark);
    text-decoration: none;
}

.sx-person:hover {
    color: var(--secondary-dark);
}

/* ============================================
   PORTRAITS & SKELETON
============================================ */

.sx-person__photo {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background: var(--sx-skeleton);
}

/* IMAGE */
.sx-person__photo img {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%;
    opacity: 0;
    transition: opacity .4s ease;
}

.sx-person__photo.is-loaded img {
    opacity: 1;
}

/* FALLBACK INITIALES */
.sx-photo-fallback {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-dark);
    background: #edf0eb;
    font-size: 2.5rem;
    font-weight: 600;
    transition: opacity .3s ease;
}

.sx-person__photo.is-loaded .sx-photo-fallback {
    opacity: 0;
}

/* SKELETON */
.sx-skeleton {
    position: absolute;
    inset: 0;
    z-index: 3;
    overflow: hidden;
    background: var(--sx-skeleton);
}

.sx-skeleton::after {
    position: absolute;
    inset: 0;
    content: "";
    transform: translateX(-100%);
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, .5) 50%,
        transparent 100%
    );
    animation: sx-skeleton-shimmer 1.5s infinite;
}

/* SKELETON DISPARAÎT */
.sx-person__photo.is-loaded .sx-skeleton,
.sx-person__photo.is-error .sx-skeleton {
    display: none;
}

/* ANIMATION */
@keyframes sx-skeleton-shimmer {
    to {
        transform: translateX(100%);
    }
}

/* ============================================
   INFORMATIONS INTERVENANTS
============================================ */

.sx-person__body {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    padding: 1.125rem 0 .25rem;
}

.sx-person__name {
    color: var(--secondary-dark);
    font-size: 1.125rem;
    font-weight: 650;
    line-height: 1.35;
    letter-spacing: -.025em;
    transition: color .2s ease;
}

.sx-person:hover .sx-person__name {
    color: var(--primary);
}

.sx-person__company {
    color: #474747;
    font-size: .71rem;
    font-style: normal;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: .025em;
}

.sx-person__role {
    color: var(--sx-muted);
    font-size: .8125rem;
    font-weight: 400;
    line-height: 1.5;
}

/* ============================================
   ÉTAT VIDE
============================================ */

.sx-empty {
    padding: 4rem 1.5rem;
    border: 1px solid var(--sx-border);
    background: transparent;
    text-align: center;
}

.sx-empty p {
    margin: 0;
}

.sx-empty .sx-reset {
    margin-top: .75rem;
}

/* ============================================
   RETOUR EN HAUT
============================================ */

.sx-top {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 1010;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 3px;
    color: #fff;
    background: var(--secondary-dark);
    box-shadow: none;
    cursor: pointer;
}

.sx-top:hover {
    background: var(--secondary);
}

/* ACCESSIBILITÉ */
.sx-select select:focus-visible,
.sx-search input:focus-visible,
.sx-person:focus-visible,
.sx-reset:focus-visible,
.sx-top:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 3px;
}

/* ============================================
   TABLETTE
============================================ */

@media (max-width: 991.98px) {
    .sx-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2rem 1.25rem;
    }
}

/* ============================================
   MOBILE
============================================ */

@media (max-width: 767.98px) {

    .sx-sticky {
        padding-top: .75rem;
    }

    .sx-controls {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: .75rem;
    }

    .sx-search {
        flex: none;
        width: 100%;
    }

    .sx-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: .5rem;
        scrollbar-width: none;
    }

    .sx-filters::-webkit-scrollbar {
        display: none;
    }

    .sx-select {
        flex: 0 0 auto;
    }

    .sx-select select {
        min-width: 135px;
    }

    .sx-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.75rem .875rem;
        padding-top: 1.5rem;
    }

    .sx-person__body {
        padding-top: .875rem;
    }

    .sx-person__name {
        font-size: 1rem;
    }

    .sx-person__company {
        font-size: .6875rem;
    }

    .sx-person__role {
        font-size: .75rem;
    }

    .sx-photo-fallback {
        font-size: 2rem;
    }

    .sx-count {
        padding: .75rem 0;
    }

    .sx-top {
        right: 1rem;
        bottom: 1rem;
    }
}

/* ACCESSIBILITÉ : ANIMATIONS */
@media (prefers-reduced-motion: reduce) {

    .sx-skeleton::after {
        animation: none;
    }

    .sx-person__photo img,
    .sx-photo-fallback,
    .sx-person__name {
        transition: none;
    }
}
