/* ===================================================
    1. BOUTONS DE FILTRE (BACKLOG) - STYLE HARMONISÉ
   =================================================== */
.rh24-filter-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    border: none !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* Couleurs des boutons coup de coeur */
.rh24-btn-fav { background-color: var(--rh24-brand, #e04b43) !important; }
.rh24-btn-redac { background-color: #f5a623 !important; }

/* État actif */
.rh24-filter-btn.active {
    box-shadow: 0 0 10px rgba(0,0,0,0.3) !important;
    filter: brightness(0.85);
}

/* Hover */
.rh24-filter-btn:hover:not(.active) {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Centrage parfait des icônes */
.rh24-filter-btn i,
.rh24-filter-btn svg,
.rh24-filter-btn span {
    line-height: 1 !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ===================================================
    2. BOUTON CŒUR (INTERACTIF) & BADGE RÉDAC
   =================================================== */
.rh24-heart-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    vertical-align: middle;
}

.rh24-heart-btn {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    cursor: pointer;
    width: 24px;
    height: 24px;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.rh24-heart-btn svg {
    fill: #e3e3e3;   /* opaque : l'ombre dure ne doit pas se voir au travers */
    width: 100%;
    height: 100%;
    transition: fill 0.3s ease;
}

.rh24-heart-btn.is-active svg {
    fill: var(--rh24-brand, #e04b43);
    /* <svg style="display:inline-block; width:1.1em; height:1.1em; vertical-align:-0.15em; margin-right:2px;" viewBox="0 0 24 24" width="1em" height="1em" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round" class="rh24-icon"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line></svg> LES DEUX OMBRES, ET DANS CET ORDRE (v6.4.33).
     *
     * `filter` est UNE propriété : cette règle ne s'ajoutait pas à l'ombre
     * portée posée plus bas sur `.rh24-heart-btn svg`, elle la REMPLAÇAIT --
     * et à deux classes contre une, elle gagnait quel que soit l'ordre du
     * fichier. Le cœur gris était donc détaché de la jaquette, et le cœur
     * rouge -- le seul qui compte, celui qu'on vient de cocher -- ne l'était
     * pas. Mesuré : `drop-shadow(rgba(224,75,67,.4) 0 0 2px)` et rien d'autre.
     *
     * L'ombre noire d'abord : elle porte la lisibilité. La lueur rouge
     * ensuite, elle n'est qu'une signature d'état. */
    /* L'ombre est celle de toutes les pastilles, plus bas : l'etat se dit
     * par la couleur, pas par une lueur (v6.10.240). */
}

/* L'ETOILE EST UNE PASTILLE DU SITE (v6.10.240).
 * Rond orange de 22 px a halo flou, posee a cote des pastilles de note --
 * 24 px, soulevees de 2 px, ombre dure -- elle etait le seul rond plein du
 * site a ne pas en avoir l'allure (releve par le proprietaire le 22/11/2026 :
 * « il faut une coherence sur tout le site »). LA REGLE : un rond plein est
 * une pastille, soulevee avec l'ombre dure ; le coeur, une icone, prend le
 * meme relief sur sa silhouette (plus bas). Un seul schema partout.
 *
 * Les valeurs sont celles de `.rh24-note-pastille` dans le theme
 * (`reprises.css`), mode sombre compris : changer l'une, c'est changer
 * l'autre. */
.rh24-badge-redac {
    background: #f5a623;
    color: #fff;
    font-size: 12px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-2px, -2px);
    box-shadow: 3px 3px 0 0 #333;
    font-weight: bold;
    flex-shrink: 0;
}
html:is(.rh24-dark, [data-theme="dark"]) .rh24-badge-redac { box-shadow: 3px 3px 0 0 #e8e8ea; }

/* ===================================================
    3. POSITIONNEMENT MINIATURES & ARTICLES
   =================================================== */
.rh24-floating-fav {
    /* FOND RETIRÉ (v3.17.0)
     *
     * La pastille sombre derrière le cœur avait été retirée des fiches IGDB
     * et des cartes de test. La garder ici donnait deux traitements pour un
     * même bouton selon la section — le lecteur n'a aucune raison de
     * comprendre pourquoi.
     *
     * Une ombre portée sur l'icône suffit à la détacher d'une jaquette
     * claire, sans ajouter de forme par-dessus l'image. */
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 20;
    background: none;
    padding: 0;
    border: none;
    line-height: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rh24-article-fav-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent !important;
    padding: 10px 0;
    flex-wrap: wrap;
}

/* --- 3.5 LABEL TEXTE BACKLOG --- */
.rh24-label-backlog {
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px;
}

/* ===================================================
    4. STYLE BORDURE ARTICLE & BADGE RÉDAC (2 LIGNES)
   =================================================== */
body:not(.single) .bloglo-article.rh24-is-redac-favorite {
    outline: 3px solid #f5a623 !important;
    outline-offset: -3px;
    position: relative;
    display: block;
}

/* La carte du plugin est encadree par `modules/effects/` -- voir la note
   « outline et non border » de `mon-sticky-pagination.php`. Rien a ajouter
   ici : deux regles pour un meme trait finiraient par diverger. */

.rh24-redac-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    vertical-align: middle;
}

.rh24-redac-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.1 !important;
}

.rh24-redac-text span {
    font-size: 11px !important;
    font-weight: 900 !important;
    color: #f5a623;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.rh24-redac-group:hover .rh24-badge-redac {
    transform: translate(-2px, -2px) scale(1.1);
    transition: transform 0.2s ease;
}

/* ==========================================================================
   FIX ULTIME POUR LES SLIDERS PYML (CŒURS VISIBLES ET FONCTIONNELS)
   ========================================================================== */

/* 1. FORCER L'AFFICHAGE DU SVG DANS LES SLIDERS */
.pyml-slider-items .rh24-heart-btn,
.pyml-slider .rh24-heart-btn,
[class*="pyml"] .rh24-heart-btn {
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    pointer-events: auto !important;
    z-index: 1000 !important;
    background: none !important;
    border: none !important;
}

/* 2. ASSURER QUE LE SVG EST VISIBLE */
.pyml-slider-items .rh24-heart-btn svg,
.pyml-slider .rh24-heart-btn svg,
[class*="pyml"] .rh24-heart-btn svg {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    fill: #e3e3e3 !important;
    transition: fill 0.3s ease !important;
    pointer-events: none !important;
}

/* 3. CŒUR ACTIF (ROUGE) DANS LES SLIDERS */
.pyml-slider-items .rh24-heart-btn.is-active svg,
.pyml-slider .rh24-heart-btn.is-active svg,
[class*="pyml"] .rh24-heart-btn.is-active svg {
    fill: var(--rh24-brand, #e04b43) !important;
}

/* 4. HOVER DANS LES SLIDERS */
.pyml-slider-items .rh24-heart-btn:hover svg,
.pyml-slider .rh24-heart-btn:hover svg,
[class*="pyml"] .rh24-heart-btn:hover svg {
    fill: rgba(200, 200, 200, 0.8) !important;
}

.pyml-slider-items .rh24-heart-btn.is-active:hover svg,
.pyml-slider .rh24-heart-btn.is-active:hover svg,
[class*="pyml"] .rh24-heart-btn.is-active:hover svg {
    fill: #ff5549 !important;
}

/* 5. CONTENEUR FLOATING DANS LES SLIDERS */
.pyml-slider-items .rh24-floating-fav,
.pyml-slider .rh24-floating-fav,
[class*="pyml"] .rh24-floating-fav {
    z-index: 999 !important;
    position: absolute !important;
    bottom: 10px !important;
    right: 10px !important;
    display: flex !important;
}

/* 6. SUPPRIMER LES ::before/::after QUI PEUVENT INTERFÉRER */
.pyml-slider-items .rh24-heart-btn::before,
.pyml-slider-items .rh24-heart-btn::after,
.pyml-slider .rh24-heart-btn::before,
.pyml-slider .rh24-heart-btn::after,
[class*="pyml"] .rh24-heart-btn::before,
[class*="pyml"] .rh24-heart-btn::after {
    display: none !important;
    content: none !important;
}

/* 7. FIX POUR LES ÉVENTUELS PROBLÈMES DE Z-INDEX */
.pyml-slider-items,
.pyml-slider,
[class*="pyml"] {
    position: relative;
}

.pyml-slider-items .rh24-heart-wrapper,
.pyml-slider .rh24-heart-wrapper,
[class*="pyml"] .rh24-heart-wrapper {
    position: relative;
    z-index: 100;
}

/* 8. ASSURER LA VISIBILITÉ EN OVERRIDE TOUS LES STYLES */
.pyml-slider-items .rh24-heart-btn svg path,
.pyml-slider .rh24-heart-btn svg path,
[class*="pyml"] .rh24-heart-btn svg path {
    fill: inherit !important;
}

/* 9. FIX SPÉCIAL SI LE SLIDER A UN OVERFLOW HIDDEN */
.pyml-slider-items,
.pyml-slider {
    overflow: visible !important;
}

/* 10. ALTERNATIVE : SI LE SVG EST VRAIMENT INVISIBLE, UTILISER UN BACKGROUND */
.rh24-heart-btn-fallback {
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23c8c8c8'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.5;
}

.rh24-heart-btn-fallback.is-active {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e04b43'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E");
    opacity: 1;
}

/* LE COEUR SUIT LA REGLE DES PASTILLES (v6.10.240).
   Il portait une ombre floue d'un pixel, quand les notes et l'etoile a cote
   de lui sont soulevees de 2 px avec l'ombre dure du site. Signale par le
   proprietaire le 22/11/2026 : « le coeur n'a pas son ombre comme les
   autres […] il faut le meme schema a tous les endroits du site ».

   Meme relief, meme ombre, posee sur la SILHOUETTE (`drop-shadow`, pas
   `box-shadow`, qui dessinerait un carre). Le gris est donc OPAQUE : a
   travers un gris translucide, l'ombre noire se verrait sous le coeur.
   En sombre, l'ombre prend l'encre claire, comme les pastilles
   (`reprises.css` du theme). Le geste au clic garde son rebond : il vit sur
   le bouton, le relief vit sur le dessin. Le selecteur vise le COEUR seul :
   `.rh24-floating-fav svg` attrapait aussi l'etoile dans sa pastille. */
.rh24-heart-btn svg {
    transform: translate(-2px, -2px);
    filter: drop-shadow(3px 3px 0 #333);
}
html:is(.rh24-dark, [data-theme="dark"]) .rh24-heart-btn svg {
    filter: drop-shadow(3px 3px 0 #e8e8ea);
}
html:is(.rh24-dark, [data-theme="dark"]) .rh24-heart-btn:not(.is-active) svg { fill: #737376; }
