/* ==========================================================================
   PALMARÈS — HALL OF FAME & RÉTROSPECTIVE OFFICIELLE
   MISS UNASMOH — Style PWA Premium / Prestige (Adapté au Reset Global)
   ========================================================================== */

:root {
    --gold: #b8901c;
    --gold-lt: #e8b84b;
    --dark: #111111;
}

/* ==========================================================================
   HEADER PRESTIGE (Ajusté pour intégration sous Header Fixe)
   ========================================================================== */

.palmares-prestige-header {
    background: linear-gradient(160deg, #0a0a0a, #1a1200 50%, #0a0a0a);
    padding: 40px 16px 36px;
    text-align: center;
    position: relative;
    overflow: hidden;

    /* ✅ DÉPLACÉ ICI depuis la media query mobile — breakout DESKTOP +
       MOBILE désormais universel, même logique que .hero-section.
       .palmares-body-content ci-dessous reçoit le même traitement pour
       que le fond gris clair de la page (#fafafa) touche aussi les
       bords en toute largeur d'écran. */
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    box-sizing: border-box;
}

.palmares-prestige-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 60% at 50% 40%, rgba(184, 144, 28, .15), transparent);
    pointer-events: none;
}

.prestige-eyebrow {
    display: inline-block;
    font-size: 11px;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--gold-lt);
    margin-bottom: 8px;
}

.prestige-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 5vw, 3.2rem);
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px;
    line-height: 1.2;
}

.prestige-divider {
    width: 48px;
    height: 2px;
    background: var(--gold);
    border: none;
    margin: 0 auto 14px;
}

.prestige-subtitle {
    color: rgba(255, 255, 255, .65);
    font-size: 13.5px;
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ==========================================================================
   CORPS DE PAGE
   ========================================================================== */

.palmares-body-content {
    background: #fafafa;
    min-height: 60vh;
    padding: 30px 0 40px;

    /* ✅ DÉPLACÉ ICI depuis la media query mobile — même breakout
       universel que le header ci-dessus, DESKTOP + MOBILE. */
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    box-sizing: border-box;
}

/* ==========================================================================
   ÉTATS (loading / error / empty)
   ========================================================================== */

.palm-state-view {
    text-align: center;
    padding: 50px 16px;
    max-width: 420px;
    margin: 0 auto;
}

.palm-state-view h3 {
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.palm-state-view p {
    color: #757575;
    font-size: 14px;
    margin-bottom: 0;
}

.state-icon {
    font-size: 3rem;
    color: var(--gold);
    margin-bottom: 16px;
    display: block;
}

.spinner-prestige {
    width: 44px;
    height: 44px;
    margin: 0 auto 18px;
    border: 3px solid #eee;
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin-prestige .8s linear infinite;
}

@keyframes spin-prestige {
    to { transform: rotate(360deg); }
}

.btn-prestige-retry,
.btn-back-home {
    display: inline-block;
    margin-top: 18px;
    padding: 10px 24px;
    border: 1px solid var(--gold);
    background: transparent;
    color: var(--gold);
    font-size: 11px;
    letter-spacing: .15em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 0;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.btn-prestige-retry:hover,
.btn-back-home:hover {
    background: var(--gold);
    color: #fff;
}

/* ==========================================================================
   SECTION ÉLITE — TOP 3 HAUTE DISTINCTION
   ========================================================================== */

.honor-elite-section {
    margin-top: 0;
}

.section-prestige-title {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 16px;
}

.elite-honor-card {
    background: #fff;
    border-radius: 14px;
    padding: 22px 16px 18px;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
    border-top: 3px solid var(--gold);
    height: 100%;
    transition: transform .2s ease, box-shadow .2s ease;
}

.elite-honor-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.09);
}

.elite-rank-tag {
    display: inline-block;
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--gold-lt), var(--gold));
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 14px;
}

.elite-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    background: #e0e0e0;
    border: 3px solid var(--gold-lt);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 0 auto 12px;
}

.elite-info-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* ==========================================================================
   GALERIE — REGISTRE DES DISTINCTIONS & RECHERCHE
   ========================================================================== */

.pwa-gallery-layout {
    margin-top: 16px;
}

.palm-filter-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.palm-search-box-v2 {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 420px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 30px;
    padding: 8px 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.palm-search-box-v2 i {
    color: var(--gold);
    font-size: 14px;
}

.palm-search-box-v2 input {
    border: none;
    outline: none;
    background: transparent;
    flex: 1;
    font-size: 13px;
    color: var(--dark);
}

.palm-search-box-v2 input::placeholder {
    color: #b0b0b0;
}

.palm-list-meta {
    padding: 0 4px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.meta-label {
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #9e9e9e;
    font-weight: 700;
}

.meta-count {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--gold);
    background: #fff8e6;
    padding: 3px 10px;
    border-radius: 20px;
}

/* ==========================================================================
   LISTE PLATE — CARTES D'HONNEUR
   ========================================================================== */

.palm-cards-flex-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 20px;
}

.palm-row-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    padding: 10px 14px;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    transition: transform .2s cubic-bezier(.4,0,.2,1), box-shadow .2s cubic-bezier(.4,0,.2,1);
}

.palm-row-card:hover,
.palm-row-card:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

.palm-meta-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.palm-rank-index {
    font-family: 'Playfair Display', serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--gold);
    width: 24px;
    flex-shrink: 0;
    text-align: center;
}

.palm-avatar-thumb {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: #e0e0e0;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.palm-cand-details {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.palm-cand-name {
    font-weight: 600;
    color: var(--dark);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.palm-cand-fac {
    font-size: 11.5px;
    color: #8a8a8a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.palm-cand-code {
    color: var(--gold);
    font-family: monospace;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: .03em;
}

.palm-meta-right {
    flex-shrink: 0;
    margin-left: 8px;
}

.distinction-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .03em;
    padding: 5px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.distinction-gold {
    background: linear-gradient(135deg, #fff3d6, #ffe6a8);
    color: #9a6c00;
    border: 1px solid #f0d38a;
}

.distinction-standard {
    background: #f5f5f5;
    color: #757575;
    border: 1px solid #e5e5e5;
}

/* ==========================================================================
   NAVIGATION BASSE PWA (MOBILE)
   ========================================================================== */

.pwa-bottom-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #eee;
    padding: 6px 12px calc(6px + env(safe-area-inset-bottom));
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 50;
}

.pwa-bottom-navigation .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    color: #9e9e9e;
    font-size: 10px;
    font-weight: 600;
}

.pwa-bottom-navigation .nav-item i {
    font-size: 16px;
}

.pwa-bottom-navigation .nav-item.active {
    color: var(--gold);
}

.nav-icon-wrapper {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff8e6;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   ADAPTATION MOBILE (le breakout du header/body est désormais universel,
   défini plus haut dans le fichier — on garde ici uniquement les
   ajustements d'espacement/tailles propres au mobile)
   ========================================================================== */

@media (max-width: 767.98px) {
    .palmares-prestige-header {
        padding: 30px 16px 24px;
    }

    .palmares-body-content {
        padding: 20px 12px 80px; /* 80px bottom pour dégager la barre PWA */
    }

    .palm-cards-flex-stack {
        padding: 0 0 16px;
    }

    .palm-row-card {
        border-radius: 8px;
    }
}

@media (max-width: 576px) {
    .elite-honor-card {
        padding: 16px 12px 14px;
    }

    .elite-avatar {
        width: 72px;
        height: 72px;
    }

    .palm-row-card {
        padding: 8px 10px;
    }

    .palm-avatar-thumb {
        width: 38px;
        height: 38px;
    }

    .palm-cand-name {
        font-size: 13px;
    }

    .palm-cand-fac,
    .palm-cand-code {
        font-size: 11px;
    }

    .distinction-badge {
        font-size: 9px;
        padding: 4px 8px;
    }

    .palm-search-box-v2 {
        max-width: 100%;
        padding: 6px 14px;
    }
}