/* Top 10 public, couche V5 (chargee apres user-top10-public.css).
   - l'en-tete devient une « scene » sombre comme le hero de la home : titre Georgia, grand 10 en filigrane ;
   - le reste suit le theme sur le fond V5 (cartes blanches en clair, nuit en sombre) ;
   - les places 4 a 10 passent sur deux colonnes : la liste pleine largeur etait surtout du vide ;
   - « Comparer avec mon Top 10 » devient le bouton principal (citron vert), inactif avec sa raison
     quand on n'est pas connecte ou qu'on regarde son propre Top 10.
   Prefixe html:has(.bg5) : sans le layout V5 (archive), l'ancien rendu reste intact. */

html:has(.bg5) .utp-page{
    --v5u-surface: #ffffff;
    --v5u-surface-2: #fbf7f9;
    --v5u-ink: #1d1a24;
    --v5u-soft: #6b6276;
    --v5u-line: rgba(29, 26, 36, .1);
    --v5u-accent: #97497c;
    --v5u-shadow: 0 18px 40px -26px rgba(80, 40, 70, .45);
    background: transparent;
    min-height: 0;
    color: var(--v5u-ink);
}
html[data-theme="dark"]:has(.bg5) .utp-page{
    --v5u-surface: #161720;
    --v5u-surface-2: #1c1d28;
    --v5u-ink: #f5f0f6;
    --v5u-soft: #b9b1c2;
    --v5u-line: rgba(245, 240, 246, .12);
    --v5u-accent: #e3a6cf;
    --v5u-shadow: 0 18px 40px -24px rgba(0, 0, 0, .8);
}

/* ------------------------------------------------ en-tete : la scene */
html:has(.bg5) .utp-page .utp-hero{
    margin: 0 0 2.4rem;
    padding: clamp(28px, 4vw, 52px) clamp(22px, 4vw, 52px) clamp(24px, 3vw, 36px);
    border: 1px solid rgba(245, 240, 246, .08);
    border-radius: 28px;
    background:
        radial-gradient(70% 90% at 0% 0%, rgba(188, 112, 164, .32), transparent 60%),
        radial-gradient(60% 80% at 100% 100%, rgba(191, 214, 65, .16), transparent 62%),
        linear-gradient(180deg, #161720, #0c0d12);
    box-shadow: 0 30px 60px -36px rgba(12, 13, 18, .9);
    color: #f5f0f6;
}
html:has(.bg5) .utp-page .utp-hero::after{
    left: auto; right: -80px; bottom: -120px;
    width: 340px; height: 340px;
    background: radial-gradient(circle, rgba(191, 214, 65, .14), transparent 65%);
}
html:has(.bg5) .utp-page .utp-hero-ten{
    position: absolute;
    right: clamp(12px, 3vw, 44px);
    top: clamp(6px, 1.5vw, 18px);
    font: italic 400 clamp(120px, 15vw, 210px)/.85 Georgia, 'Times New Roman', serif;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(191, 214, 65, .32);
    letter-spacing: -.04em;
    pointer-events: none;
    user-select: none;
}
html:has(.bg5) .utp-page .utp-hero-body{
    position: relative; z-index: 1;
    max-width: 760px;
    margin: 0;
    padding: 0;
    background: none;
    box-shadow: none;
    backdrop-filter: none;
}
html:has(.bg5) .utp-page .utp-hero-title{
    font: 400 clamp(2.2rem, 4.2vw, 3.5rem)/1.05 Georgia, 'Times New Roman', serif;
    letter-spacing: -.015em;
    color: #f5f0f6;
    text-shadow: none;
}
html:has(.bg5) .utp-page .utp-hero-username{
    font-style: italic;
    font-weight: 400;
    color: #BFD641;
    text-shadow: none;
}
html:has(.bg5) .utp-page .utp-hero-signature{
    margin-top: .7rem;
    font-style: normal;
    font-size: 11px; font-weight: 700;
    letter-spacing: .18em; text-transform: uppercase;
    color: #b9b1c2;
}
html:has(.bg5) .utp-page .utp-hero-intro{ color: rgba(245, 240, 246, .88); }
html:has(.bg5) .utp-page .utp-hero-score{
    margin-top: 1.1rem;
    padding: .45rem .95rem;
    border: 1px solid rgba(255, 209, 102, .35);
    border-radius: 999px;
    background: rgba(255, 209, 102, .08);
    font-size: .95rem;
    color: #ffd166;
}

html:has(.bg5) .utp-page .utp-hero-actions{
    position: relative; z-index: 1;
    max-width: none;
    margin: 1.6rem 0 0;
    padding-top: 1.3rem;
    border-top: 1px solid rgba(245, 240, 246, .1);
}
html:has(.bg5) .utp-page .utp-badge{
    background: rgba(255, 255, 255, .06);
    border-color: rgba(245, 240, 246, .14);
    box-shadow: none;
    backdrop-filter: none;
    color: #f5f0f6;
}
html:has(.bg5) .utp-page .utp-share-btn{
    background: transparent;
    border: 1px solid rgba(245, 240, 246, .26);
    box-shadow: none;
    backdrop-filter: none;
    color: #f5f0f6;
}
html:has(.bg5) .utp-page .utp-share-btn:hover{
    background: rgba(255, 255, 255, .08);
    border-color: rgba(191, 214, 65, .6);
    box-shadow: none;
}
html:has(.bg5) .utp-page .utp-share-btn.copied{ background: #BFD641; border-color: #BFD641; color: #1d1a24; }

/* Le bouton principal de la page */
html:has(.bg5) .utp-page .utp-compare-btn{
    padding: .62rem 1.25rem;
    border: 1px solid #BFD641;
    border-radius: 999px;
    background: #BFD641;
    color: #1d1a24;
    font-weight: 700;
    backdrop-filter: none;
    box-shadow: 0 10px 24px -12px rgba(191, 214, 65, .9);
}
html:has(.bg5) .utp-page .utp-compare-btn:hover:not(:disabled){
    background: #cde45a;
    border-color: #cde45a;
    transform: translateY(-1px);
    box-shadow: 0 14px 28px -12px rgba(191, 214, 65, .95);
}
html:has(.bg5) .utp-page .utp-compare-btn:disabled{
    opacity: 1;
    cursor: wait;
}
/* Inactif (pas connecte, ou son propre Top 10) : lisible, mais clairement non cliquable. */
html:has(.bg5) .utp-page .utp-compare-btn[aria-disabled="true"]{
    background: transparent;
    border: 1px dashed rgba(191, 214, 65, .5);
    color: rgba(191, 214, 65, .8);
    box-shadow: none;
    cursor: not-allowed;
}
html:has(.bg5) .utp-page .utp-compare-hint{
    position: relative; z-index: 1;
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
    margin: .9rem 0 0;
    font-size: 13px;
    color: #b9b1c2;
}
html:has(.bg5) .utp-page .utp-compare-hint i{ color: #BFD641; }
html:has(.bg5) .utp-page .utp-compare-hint a{ color: #BFD641; font-weight: 700; text-decoration: none; }
html:has(.bg5) .utp-page .utp-compare-hint a:hover{ text-decoration: underline; }
html:has(.bg5) .utp-page .utp-compare-summary,
html:has(.bg5) .utp-page .utp-match-score{ position: relative; z-index: 1; }

/* Le portrait : une lettrine Georgia, un liseré citron vert */
html:has(.bg5) .utp-page .utp-insight-card{
    position: relative; z-index: 1;
    margin-top: 1.6rem;
    padding: 1.4rem 1.6rem 1.1rem;
    border: 1px solid rgba(245, 240, 246, .1);
    border-left: 3px solid #BFD641;
    border-radius: 18px;
    background: rgba(255, 255, 255, .04);
}
html:has(.bg5) .utp-page .utp-insight-eyebrow{
    margin: 0 0 .8rem;
    font-size: 11px; font-weight: 700;
    letter-spacing: .18em; text-transform: uppercase;
    color: #BFD641;
}
html:has(.bg5) .utp-page .utp-insight-text{
    margin: 0;
    white-space: pre-line;
    font-size: 15px; line-height: 1.75;
    color: rgba(245, 240, 246, .88);
}
html:has(.bg5) .utp-page .utp-insight-text::first-letter{
    float: left;
    margin: .08em .14em 0 0;
    font: italic 400 3.1em/.85 Georgia, 'Times New Roman', serif;
    color: #BFD641;
}
html:has(.bg5) .utp-page .utp-insight-signature{ margin: 1rem 0 0; font-size: .82rem; color: #b9b1c2; }

/* ------------------------------------------------ podium */
html:has(.bg5) .utp-page .utp-content-wrapper{ padding-top: 4.5rem; }
html:has(.bg5) .utp-page .utp-podium-card{
    background: var(--v5u-surface);
    border-color: var(--v5u-line);
    box-shadow: var(--v5u-shadow);
    color: var(--v5u-ink);
}
html:has(.bg5) .utp-page .utp-podium-card[data-pos="1"]{
    background:
        radial-gradient(ellipse 140% 70% at 50% -10%, rgba(255, 215, 0, .16), transparent 55%),
        var(--v5u-surface);
    border-color: rgba(214, 170, 30, .6);
}
html:has(.bg5) .utp-page .utp-podium-card[data-pos="2"],
html:has(.bg5) .utp-page .utp-podium-card[data-pos="3"]{ background: var(--v5u-surface); }
/* La vignette prend la forme d'arche des niches de la home. */
html:has(.bg5) .utp-page .utp-podium-thumb{
    border-radius: 999px 999px 18px 18px;
    background: #f7f2ee;
}
html:has(.bg5) .utp-page .utp-podium-name{
    font: 400 1.15rem/1.2 Georgia, 'Times New Roman', serif;
    color: var(--v5u-ink);
}
html:has(.bg5) .utp-page .utp-podium-card[data-pos="1"] .utp-podium-name{ font-size: 1.35rem; }
html:has(.bg5) .utp-page .utp-podium-note{ color: var(--v5u-soft); }

/* ------------------------------------------------ places 4 a 10 : deux colonnes */
html:has(.bg5) .utp-page .utp-list{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
html:has(.bg5) .utp-page .utp-item-link{
    grid-template-columns: 62px 72px minmax(0, 1fr) 18px;
    gap: 14px;
    padding: 12px 16px 12px 12px;
    background: var(--v5u-surface);
    border: 1px solid var(--v5u-line);
    border-radius: 20px;
    box-shadow: var(--v5u-shadow);
    color: var(--v5u-ink);
}
html:has(.bg5) .utp-page .utp-item-link:hover{
    transform: translateY(-3px);
    background: var(--v5u-surface-2);
    border-color: rgba(191, 214, 65, .55);
}
html:has(.bg5) .utp-page .utp-rank{
    padding: 0;
    background: none;
    backdrop-filter: none;
    font: italic 400 1.75rem/1 Georgia, 'Times New Roman', serif;
    color: var(--v5u-accent);
    white-space: nowrap;
    text-align: center;
    box-shadow: none;
    border-radius: 0;
}
html:has(.bg5) .utp-page .utp-podium-info{
    background: none;
    backdrop-filter: none;
    box-shadow: none;
}
html:has(.bg5) .utp-page .utp-info{
    padding: 0;
    background: none;
    backdrop-filter: none;
    border-radius: 0;
}
html:has(.bg5) .utp-page .utp-thumb{
    width: 72px; height: 88px;
    border-radius: 999px 999px 14px 14px;
    background: #f7f2ee;
}
html:has(.bg5) .utp-page .utp-name{
    font: 400 1.05rem/1.25 Georgia, 'Times New Roman', serif;
    color: var(--v5u-ink);
    -webkit-line-clamp: 2;
}
html:has(.bg5) .utp-page .utp-meta{ color: var(--v5u-soft); }
html:has(.bg5) .utp-page .utp-arrow{ color: var(--v5u-soft); }
html:has(.bg5) .utp-page .utp-item-link:hover .utp-arrow{ color: #9fb52a; }

/* ------------------------------------------------ appel final et pied */
html:has(.bg5) .utp-page .utp-cta-block{
    background:
        radial-gradient(60% 90% at 100% 0%, rgba(191, 214, 65, .16), transparent 60%),
        var(--v5u-surface);
    border: 1px solid var(--v5u-line);
    border-radius: 24px;
    box-shadow: var(--v5u-shadow);
    color: var(--v5u-ink);
}
html:has(.bg5) .utp-page .utp-cta-title{ font: 400 1.6rem/1.2 Georgia, 'Times New Roman', serif; color: var(--v5u-ink); }
html:has(.bg5) .utp-page .utp-cta-desc{ color: var(--v5u-soft); }
html:has(.bg5) .utp-page .utp-cta-link{
    background: #BFD641;
    border-color: #BFD641;
    color: #1d1a24;
    border-radius: 999px;
    box-shadow: 0 10px 24px -12px rgba(191, 214, 65, .9);
}
html:has(.bg5) .utp-page .utp-cta-link:hover{ background: #cde45a; color: #1d1a24; }
html:has(.bg5) .utp-page .utp-footer-label,
html:has(.bg5) .utp-page .utp-footer-link{ color: var(--v5u-soft); }
html:has(.bg5) .utp-page .utp-state-card{
    background: var(--v5u-surface);
    border-color: var(--v5u-line);
    color: var(--v5u-ink);
}

/* ------------------------------------------------ etroit */
@media (max-width: 900px){
    html:has(.bg5) .utp-page .utp-list{ grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 576px){
    html:has(.bg5) .utp-page .utp-hero{ border-radius: 22px; }
    html:has(.bg5) .utp-page .utp-hero-ten{ opacity: .6; }
    html:has(.bg5) .utp-page .utp-item-link{ grid-template-columns: 48px 60px minmax(0, 1fr) 14px; }
    html:has(.bg5) .utp-page .utp-rank{ font-size: 1.4rem; }
    html:has(.bg5) .utp-page .utp-thumb{ width: 60px; height: 74px; }
}

/* ================================================================ THEME CLAIR */
/* En clair, l'en-tete quitte la scene sombre : ivoire avec lueurs rose et citron vert, texte encre.
   Le citron vert vif reste pour les aplats ; pour le texte il passe au vert olive lisible. */
html[data-theme="light"]:has(.bg5) .utp-page .utp-hero{
    border-color: rgba(29, 26, 36, .08);
    background:
        radial-gradient(70% 90% at 0% 0%, rgba(188, 112, 164, .16), transparent 60%),
        radial-gradient(60% 80% at 100% 100%, rgba(191, 214, 65, .22), transparent 62%),
        linear-gradient(180deg, #fffdfb, #fbf6f8);
    box-shadow: 0 30px 60px -40px rgba(80, 40, 70, .45);
    color: #1d1a24;
}
html[data-theme="light"]:has(.bg5) .utp-page .utp-hero::after{ background: radial-gradient(circle, rgba(191, 214, 65, .22), transparent 65%); }
html[data-theme="light"]:has(.bg5) .utp-page .utp-hero-ten{ -webkit-text-stroke-color: rgba(95, 111, 18, .3); }
html[data-theme="light"]:has(.bg5) .utp-page .utp-hero-title{ color: #1d1a24; }
html[data-theme="light"]:has(.bg5) .utp-page .utp-hero-username{ color: #5f6f12; }
html[data-theme="light"]:has(.bg5) .utp-page .utp-hero-signature{ color: #6b6276; }
html[data-theme="light"]:has(.bg5) .utp-page .utp-hero-intro{ color: #3a3442; }
html[data-theme="light"]:has(.bg5) .utp-page .utp-hero-score{
    border-color: rgba(176, 128, 10, .35);
    background: rgba(255, 209, 102, .18);
    color: #8a5d00;
}
html[data-theme="light"]:has(.bg5) .utp-page .utp-hero-actions{ border-top-color: rgba(29, 26, 36, .1); }
html[data-theme="light"]:has(.bg5) .utp-page .utp-badge{
    background: rgba(29, 26, 36, .04);
    border-color: rgba(29, 26, 36, .12);
    color: #1d1a24;
}
html[data-theme="light"]:has(.bg5) .utp-page .utp-share-btn{ border-color: rgba(29, 26, 36, .2); color: #1d1a24; }
html[data-theme="light"]:has(.bg5) .utp-page .utp-share-btn:hover{ background: rgba(29, 26, 36, .05); border-color: rgba(95, 111, 18, .55); }
html[data-theme="light"]:has(.bg5) .utp-page .utp-compare-btn[aria-disabled="true"]{
    border-color: rgba(95, 111, 18, .5);
    color: #5f6f12;
}
html[data-theme="light"]:has(.bg5) .utp-page .utp-compare-hint{ color: #6b6276; }
html[data-theme="light"]:has(.bg5) .utp-page .utp-compare-hint i,
html[data-theme="light"]:has(.bg5) .utp-page .utp-compare-hint a{ color: #5f6f12; }
html[data-theme="light"]:has(.bg5) .utp-page .utp-compare-summary{ color: #3a3442; }
html[data-theme="light"]:has(.bg5) .utp-page .utp-insight-card{
    border-color: rgba(29, 26, 36, .08);
    border-left-color: #9fb52a;
    background: rgba(255, 255, 255, .75);
}
html[data-theme="light"]:has(.bg5) .utp-page .utp-insight-eyebrow{ color: #5f6f12; }
html[data-theme="light"]:has(.bg5) .utp-page .utp-insight-text{ color: #2c2733; }
html[data-theme="light"]:has(.bg5) .utp-page .utp-insight-text::first-letter{ color: #5f6f12; }
html[data-theme="light"]:has(.bg5) .utp-page .utp-insight-signature{ color: #6b6276; }
html[data-theme="light"]:has(.bg5) .utp-page .utp-match-percent{ color: #1d1a24; }
html[data-theme="light"]:has(.bg5) .utp-page .utp-match-label{ color: #5f6f12; }
