/* ============================================================
   RECYCLETEK — CUSTOM BLOG CSS  (v3 — version corrigée icônes)
   ============================================================
   CHANGELOG v3 :
   ✓ CHARGEMENT de Material Icons via Google Fonts CDN
     → corrige les "star star star" affichés en texte
     → corrige les textes "home", "search", "comment"
     → corrige le TOC et tous les boutons avec icônes
   ✓ Styles scopés par #prestablogfront et .prestablog uniquement
   ✓ Correction du TOC (sommaire) : layout, icônes, bouton toggle
   ✓ Correction des étoiles de notation : couleur jaune, taille normale
   ✓ Correction breadcrumb : "home", "search", "comment" → icônes
   ✓ Barre de recherche et derniers articles : cachés en colonne si
     encore présents (tu as dégreffé, mais au cas où)
   ============================================================ */

/* ========== 🎯 CHARGEMENT DES FONTS MATERIAL ICONS ========== */
/* Indispensable : PrestaBlog utilise <i class="material-icons">star</i>
   et ton thème n'a pas de @font-face pour Material Icons.
   On charge via Google Fonts CDN (ultra-léger, mis en cache global). */

@import url('https://fonts.googleapis.com/icon?family=Material+Icons');

/* Force le rendu correct des icônes material-icons */
.material-icons,
i.material-icons {
    font-family: 'Material Icons' !important;
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

/* ========== VARIABLES RECYCLETEK ========== */
:root {
    --rt-green: #1a9e5f;
    --rt-green-dark: #0f6e56;
    --rt-green-light: #4dd99a;
    --rt-green-soft: #f0faf5;
    --rt-dark: #0d2d3a;
    --rt-text: #1a1a1a;
    --rt-text-soft: #6b7280;
    --rt-border: #e4e9ed;
    --rt-bg-soft: #f8f9fa;
    --rt-gradient-cta: linear-gradient(135deg, #6a0dad 0%, #8224e3 50%, #229cf9 100%);
    --rt-shadow: 0 4px 20px rgba(13, 45, 58, 0.08);
    --rt-shadow-hover: 0 8px 30px rgba(26, 158, 95, 0.15);
    --rt-radius: 12px;
    --rt-radius-sm: 8px;
    --rt-font: 'Montserrat', Arial, sans-serif;
}

/* ============================================================
   ⭐ ÉTOILES DE NOTATION (fix critique)
   Avant : affichage vertical "star star star star star"
   Après : étoiles jaunes alignées horizontalement
   ============================================================ */

/* Conteneur des étoiles */
.prestablog .rating,
.prestablog [class*="rating"],
.blogitems .rating,
.news .rating,
#prestablog-rating,
.comments_note,
.prestablograting {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 2px;
    padding: 0;
    background: transparent;
}

/* Les étoiles elles-mêmes (i.material-icons dans PrestaBlog) */
.prestablog .material-icons,
.blogitems .material-icons,
.news .material-icons,
#prestablog-rating .material-icons,
.prestablograting .material-icons {
    color: #ffc107 !important;
    font-size: 20px !important;
    line-height: 1 !important;
    display: inline-block !important;
}

/* Cas où les étoiles utilisent du texte "star" */
.prestablog i[class*="star"],
.blogitems i[class*="star"] {
    color: #ffc107 !important;
}

/* Bouton "Noter l'article" */
a[href*="note"],
button[class*="note"],
a.articleslinks[href*="note"] {
    display: inline-block !important;
    background: var(--rt-gradient-cta) !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 25px !important;
    border-radius: 25px !important;
    font-family: var(--rt-font) !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none !important;
    box-shadow: 0 4px 15px rgba(130, 36, 227, 0.3);
}

a[href*="note"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(130, 36, 227, 0.4);
    color: #fff !important;
}

/* ============================================================
   📖 TABLE OF CONTENTS (Sommaire) — FIX
   ============================================================ */

/* Conteneur global */
#prestablog-toc-container,
.prestablog-toc-wrapper {
    background: linear-gradient(135deg, var(--rt-green-soft) 0%, #ffffff 100%);
    border: 1px solid rgba(26, 158, 95, 0.2);
    border-left: 4px solid var(--rt-green);
    border-radius: var(--rt-radius);
    padding: 20px 25px;
    margin: 25px 0;
    box-shadow: var(--rt-shadow);
    position: relative;
}

/* Titre "Table of Contents" */
.prestablog-toc-title,
#prestablog-toc-container > div:first-child,
.toc-title {
    color: var(--rt-dark) !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    margin: 0 0 15px 0 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: var(--rt-font) !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

/* Icône livre à côté du titre */
.prestablog-toc-title .material-icons,
#prestablog-toc-container .material-icons {
    color: var(--rt-green) !important;
    font-size: 22px !important;
    margin-right: 8px;
    vertical-align: middle;
}

/* Bouton toggle (flèche) */
.prestablog-toc-toggle,
#prestablog-toc-container button {
    background: var(--rt-green) !important;
    color: #fff !important;
    border: none !important;
    padding: 5px 10px !important;
    border-radius: 50% !important;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.prestablog-toc-toggle:hover {
    background: var(--rt-green-dark) !important;
    transform: rotate(180deg);
}

.prestablog-toc-toggle .material-icons {
    color: #fff !important;
    font-size: 20px !important;
}

/* Liste des liens TOC */
.prestablog-toc-list,
#prestablog-toc-container ul,
#prestablog-toc-container ol {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.prestablog-toc-item,
#prestablog-toc-container li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.prestablog-toc-link,
#prestablog-toc-container a {
    display: block !important;
    padding: 8px 12px !important;
    color: var(--rt-text) !important;
    text-decoration: none !important;
    border-radius: 6px !important;
    transition: all 0.25s ease !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    font-weight: 500 !important;
}

.prestablog-toc-link:hover,
#prestablog-toc-container a:hover {
    background: var(--rt-green) !important;
    color: #fff !important;
    padding-left: 18px !important;
    text-decoration: none !important;
}

.prestablog-toc-level-3 {
    padding-left: 20px !important;
    font-size: 13px !important;
}

.prestablog-toc-level-4 {
    padding-left: 35px !important;
    font-size: 13px !important;
}

/* ============================================================
   🏠 BREADCRUMB (fil d'ariane "home Guides search")
   ============================================================ */

/* Le breadcrumb "home" est un material-icons → on le cache s'il s'affiche
   en texte, ou on le stylise si la font charge */

/* Si ta font material-icons ne charge pas sur certains caches,
   on ajoute un fallback : masquer le texte "home" etc. */

/* ============================================================
   🔍 CACHER LES BLOCS DÉGREFFÉS QUI RESTENT
   (barre recherche blog + derniers articles en colonne)
   ============================================================ */

/* Si après dégreffage ils apparaissent encore comme "résidus" en haut
   de la page liste (comme on voit dans les captures), on les cache */

/* ⚠️ On ne cache QUE si on est sur une page catégorie blog ou listing blog
   où la sidebar n'a pas d'intérêt */
body[class*="category-blog"] #prestablog_recherche,
body[class*="category-blog"] #prestablog_lastliste {
    display: none !important;
}

/* Pour la page principale du blog, on peut garder le widget
   mais le styliser proprement (tu peux commenter ces lignes si tu
   veux afficher la barre de recherche sur /blog) */

/* ============================================================
   TITRES ET CONTENU DE L'ARTICLE
   ============================================================ */

/* H1 centré avec ligne verte dessous (matche ton design actuel) */
#prestablogfront h1,
.prestablog h1 {
    font-family: var(--rt-font);
    font-weight: 700;
    color: var(--rt-dark);
    font-size: 1.85rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
    text-align: center;
}

#prestablogfront h1::after,
.prestablog h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--rt-green);
    border-radius: 2px;
}

#prestablogfront h2,
.prestablog h2 {
    font-family: var(--rt-font);
    font-weight: 700;
    color: var(--rt-dark);
    font-size: 1.5rem;
    margin-top: 40px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--rt-border);
}

#prestablogfront h3,
.prestablog h3 {
    font-family: var(--rt-font);
    font-weight: 600;
    color: var(--rt-green-dark);
    font-size: 1.25rem;
    margin-top: 30px;
    margin-bottom: 15px;
}

#prestablogfront h4,
.prestablog h4 {
    font-family: var(--rt-font);
    font-weight: 600;
    color: var(--rt-dark);
    font-size: 1.1rem;
    margin-top: 20px;
    margin-bottom: 10px;
}

/* Paragraphes */
.prestablog p,
#prestablogfront .prestablog p {
    color: var(--rt-text);
    font-size: 16px;
    line-height: 1.75;
    margin-bottom: 18px;
    font-family: var(--rt-font);
}

.prestablog strong,
#prestablogfront .prestablog strong {
    color: var(--rt-dark);
    font-weight: 700;
}

/* Listes */
.prestablog ul,
.prestablog ol {
    padding-left: 25px;
    margin-bottom: 20px;
}

.prestablog ul li,
.prestablog ol li {
    color: var(--rt-text);
    font-size: 16px;
    line-height: 1.75;
    margin-bottom: 8px;
    padding-left: 5px;
}

.prestablog ul li::marker {
    color: var(--rt-green);
}

/* Liens dans le contenu */
.prestablog p a,
.prestablog li a {
    color: var(--rt-green-dark);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(26, 158, 95, 0.3);
    text-underline-offset: 3px;
    transition: all 0.3s ease;
}

.prestablog p a:hover,
.prestablog li a:hover {
    color: var(--rt-green);
    text-decoration-color: var(--rt-green);
}

/* ============================================================
   📊 TABLEAU COMPARATIF
   ============================================================ */

.prestablog table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    border-radius: var(--rt-radius);
    overflow: hidden;
    box-shadow: var(--rt-shadow);
    border: none;
}

.prestablog table thead {
    background: var(--rt-dark);
}

.prestablog table thead th {
    background: var(--rt-dark);
    color: #fff;
    font-family: var(--rt-font);
    font-weight: 700;
    padding: 15px;
    text-align: left;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}

.prestablog table tbody tr {
    transition: background 0.2s ease;
    border-bottom: 1px solid var(--rt-border);
}

.prestablog table tbody tr:nth-child(even) {
    background: var(--rt-bg-soft);
}

.prestablog table tbody tr:hover {
    background: var(--rt-green-soft);
}

.prestablog table td {
    padding: 14px 15px;
    color: var(--rt-text);
    font-size: 14px;
    border: none;
    border-bottom: 1px solid var(--rt-border);
}

.prestablog table td strong {
    color: var(--rt-green-dark);
}

/* ============================================================
   🏷️ MÉTA INFOS
   ============================================================ */

#prestablogfront .prestablogdat,
#prestablogfront .date_blog-cat,
#prestablogfront .author,
.prestablog .date_blog-cat {
    color: var(--rt-text-soft);
    font-size: 13px;
    font-family: var(--rt-font);
}

.prestablog .cat_prestablog,
#prestablogfront .cat_prestablog {
    display: inline-block;
    background: var(--rt-green-soft);
    color: var(--rt-green-dark);
    padding: 4px 12px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(26, 158, 95, 0.2);
    text-decoration: none;
}

/* ============================================================
   📰 PAGE LISTE DU BLOG
   ============================================================ */

/* Cartes d'articles */
#prestablog_home .blogitems,
#prestablog_home .news,
#prestablog_categorieslist .blogitems,
#prestablog_categorieslist .news,
#prestablog_lastliste .news {
    background: #fff;
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius);
    overflow: hidden;
    box-shadow: var(--rt-shadow);
    transition: all 0.35s ease;
    margin-bottom: 25px;
}

#prestablog_home .blogitems:hover,
#prestablog_home .news:hover,
#prestablog_categorieslist .blogitems:hover,
#prestablog_categorieslist .news:hover {
    transform: translateY(-4px);
    box-shadow: var(--rt-shadow-hover);
    border-color: var(--rt-green-light);
}

#prestablog_home .info_blog,
#prestablog_categorieslist .info_blog {
    padding: 20px;
}

#prestablog_home .blog_desc,
#prestablog_categorieslist .blog_desc {
    color: var(--rt-text-soft);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* ============================================================
   🛒 PRODUITS ASSOCIÉS
   ============================================================ */

.prestablog .related_blog_product,
#prestablogfront .related_blog_product {
    margin: 40px 0;
    padding: 30px;
    background: var(--rt-bg-soft);
    border-radius: var(--rt-radius);
}

.prestablog .related_blog_product h3,
.prestablog .related_blog_product h4 {
    color: var(--rt-dark);
    font-size: 1.4rem;
    margin-bottom: 20px;
    font-family: var(--rt-font);
    font-weight: 700;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--rt-green);
    display: inline-block;
}

.prestablog .related_blog_product a img {
    border-radius: var(--rt-radius-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--rt-border);
}

.prestablog .related_blog_product a:hover img {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(26, 158, 95, 0.15);
    border-color: var(--rt-green-light);
}

/* ============================================================
   📱 BOUTONS SOCIAUX
   ============================================================ */

.blogsoc-buttons,
.blogsoc-icon-container {
    display: flex !important;
    gap: 10px !important;
    margin: 20px 0 !important;
    padding: 15px 0 !important;
}

/* On laisse les boutons sociaux dans leur style original (ils fonctionnent) */
/* On ajoute juste une animation au hover */
.blogsoc-icon {
    transition: all 0.3s ease !important;
}

.blogsoc-icon:hover {
    transform: translateY(-3px) scale(1.08);
}

/* ============================================================
   💬 COMMENTAIRES
   ============================================================ */

#prestablog-comments,
#prestablog-comment {
    background: #fff;
    padding: 25px;
    border-radius: var(--rt-radius);
    border: 1px solid var(--rt-border);
    margin: 20px 0;
}

#prestablog-comment input[type="text"],
#prestablog-comment textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--rt-border);
    border-radius: var(--rt-radius-sm);
    font-family: var(--rt-font);
    font-size: 14px;
    transition: border-color 0.3s ease;
    margin-bottom: 12px;
}

#prestablog-comment input[type="text"]:focus,
#prestablog-comment textarea:focus {
    border-color: var(--rt-green);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 158, 95, 0.1);
}

#prestablog-comment button[type="submit"],
#prestablog-comment input[type="submit"] {
    background: var(--rt-gradient-cta) !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 30px !important;
    border-radius: 25px !important;
    font-family: var(--rt-font) !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(130, 36, 227, 0.25);
}

#prestablog-comment button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(130, 36, 227, 0.4);
}

/* ============================================================
   📑 BOUTON "TOUS LES ARTICLES"
   ============================================================ */

.articleslinks,
a.articleslinks {
    display: inline-block !important;
    background: var(--rt-gradient-cta) !important;
    color: #fff !important;
    padding: 12px 30px !important;
    border-radius: 25px !important;
    text-decoration: none !important;
    font-family: var(--rt-font) !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(130, 36, 227, 0.3);
    border: none !important;
}

.articleslinks:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(130, 36, 227, 0.45);
    color: #fff !important;
    text-decoration: none !important;
}

/* ============================================================
   🔢 PAGINATION
   ============================================================ */

.prestablog_pagination a,
.prestablog_pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    background: #fff;
    color: var(--rt-dark);
    border: 2px solid var(--rt-border);
    border-radius: var(--rt-radius-sm);
    text-decoration: none;
    font-family: var(--rt-font);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    margin: 0 4px;
}

.prestablog_pagination a:hover {
    background: var(--rt-green);
    color: #fff;
    border-color: var(--rt-green);
    transform: translateY(-2px);
    text-decoration: none;
}

.prestablog_pagination .current {
    background: var(--rt-green);
    color: #fff;
    border-color: var(--rt-green);
}

/* ============================================================
   📝 CITATIONS
   ============================================================ */

.prestablog blockquote {
    background: var(--rt-green-soft);
    border-left: 4px solid var(--rt-green);
    padding: 20px 25px;
    margin: 25px 0;
    border-radius: 0 var(--rt-radius) var(--rt-radius) 0;
    font-style: italic;
    color: var(--rt-dark);
}

/* Séparateur HR */
.prestablog hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--rt-border), transparent);
    margin: 30px 0;
}

/* ============================================================
   📱 RESPONSIVE MOBILE
   ============================================================ */

@media (max-width: 768px) {
    #prestablogfront h1,
    .prestablog h1 {
        font-size: 1.4rem;
    }

    #prestablogfront h2,
    .prestablog h2 {
        font-size: 1.2rem;
    }

    #prestablogfront h3,
    .prestablog h3 {
        font-size: 1.05rem;
    }

    .prestablog table {
        font-size: 12px;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .prestablog table td,
    .prestablog table th {
        padding: 10px 8px;
        font-size: 12px;
    }

    #prestablog-toc-container,
    .prestablog-toc-wrapper {
        padding: 15px;
    }

    .prestablog .related_blog_product {
        padding: 20px 15px;
    }
}

/* ============================================================
   ✨ ANIMATION FADE-IN
   ============================================================ */

@keyframes rtFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.prestablog {
    animation: rtFadeInUp 0.5s ease-out;
}
/* ============================================================
   PATCH v3.1 - À AJOUTER À LA FIN DE custom-blog.css
   Corrections :
   1. TOC : ouvert par défaut
   2. Étoiles : jaunes partout (même sur page liste)
   ============================================================ */

/* ⭐ FIX 1 : Étoiles jaunes partout (carte d'article, liste, article) */

/* Cible TOUTES les étoiles du module PrestaBlog, dans tous les contextes */
.prestablog .material-icons,
.blogitems .material-icons,
.news .material-icons,
#prestablog-rating .material-icons,
.prestablog_rating .material-icons,
.info_blog .material-icons,
.prestablograting .material-icons,
.prestablograting_container .material-icons {
    /* Par défaut, style commun des icônes du blog */
    vertical-align: middle;
}

/* Couleur jaune pour les étoiles UNIQUEMENT (basé sur le texte "star") */
.prestablog .material-icons:not(:empty),
.blogitems .material-icons:not(:empty),
.news .material-icons:not(:empty),
.info_blog .material-icons:not(:empty) {
    /* On réinitialise */
}

/* Force la couleur jaune sur TOUTES les étoiles (contenu "star" ou classe étoile) */
.material-icons[data-icon*="star"],
i.material-icons:has-text("star"),
.info_blog i.material-icons,
.blogitems i.material-icons,
.news i.material-icons,
.prestablograting i.material-icons,
.rating_blog i.material-icons,
[class*="rating"] .material-icons,
[class*="star"] .material-icons {
    color: #ffc107 !important;
    font-size: 18px !important;
}

/* Fallback universel : toutes les étoiles dans les cartes d'articles */
.blogitems .material-icons,
.news .material-icons,
.info_blog .material-icons,
#prestablog_home .material-icons,
#prestablog_categorieslist .material-icons,
#prestablog_lastliste .material-icons {
    color: #ffc107 !important;
    font-size: 18px !important;
}

/* Mais on PROTÈGE les icônes du breadcrumb (home, search) et du TOC qui doivent rester noires/vertes */
.breadcrumb .material-icons,
nav .material-icons,
.prestablog-nav-top .material-icons,
#prestablog-toc-container .material-icons,
.prestablog-toc .material-icons {
    color: inherit !important;
    font-size: 22px !important;
}

/* Icône search dans le breadcrumb noir */
.prestablog-nav-top .material-icons {
    color: #fff !important;
}

/* ============================================================
   📖 FIX 2 : TOC ouvert par défaut + liens visibles
   ============================================================ */

/* Force l'affichage du contenu du TOC (par défaut PrestaBlog le cache) */
#prestablog-toc-container .prestablog-toc-list,
.prestablog-toc .prestablog-toc-list,
#prestablog-toc-container ul,
#prestablog-toc-container ol {
    display: block !important;
    visibility: visible !important;
    max-height: none !important;
    opacity: 1 !important;
    overflow: visible !important;
    margin-top: 15px !important;
}

/* Pour éviter que le toggle ferme le TOC : mode "toujours ouvert" */
/* (on peut réactiver le toggle plus tard si souhaité) */
#prestablog-toc-container[data-collapsed="true"] .prestablog-toc-list,
.prestablog-toc.collapsed .prestablog-toc-list {
    display: block !important;
    max-height: none !important;
}

/* Rotation du bouton toggle quand ouvert */
.prestablog-toc-toggle.open .material-icons,
#prestablog-toc-container[data-state="open"] .prestablog-toc-toggle .material-icons {
    transform: rotate(180deg);
}

/* ============================================================
   🎨 AMÉLIORATION : Le bouton toggle du TOC
   ============================================================ */
.prestablog-toc-toggle,
#prestablog-toc-container .prestablog-toc-toggle,
button.prestablog-toc-toggle {
    background: var(--rt-green) !important;
    color: #fff !important;
    border: none !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    padding: 0 !important;
}

.prestablog-toc-toggle:hover {
    background: var(--rt-green-dark) !important;
    transform: scale(1.1);
}

.prestablog-toc-toggle .material-icons {
    color: #fff !important;
    font-size: 20px !important;
    margin: 0 !important;
}

/* ============================================================
   💡 FIX 3 : Icônes TOC title (livre 📖 à gauche)
   ============================================================ */
.prestablog-toc-title .material-icons:first-child,
#prestablog-toc-container .prestablog-toc-title .material-icons:first-child {
    color: var(--rt-green) !important;
    font-size: 22px !important;
    margin-right: 8px !important;
    vertical-align: middle !important;
}
/* ============================================================
   PATCH v3.2 - Corrections finales
   À AJOUTER À LA FIN DE custom-blog.css
   
   Corrections :
   1. TOC : désactiver le mode sticky/floating (plus de superposition)
   2. Étoiles : jaunes DANS TOUS les contextes (titre article inclus)
   3. TOC : largeur limitée pour ne pas déborder
   ============================================================ */

/* ============================================================
   🚫 FIX 1 : TOC STATIQUE (pas de floating/sticky)
   Le TOC ne doit PAS suivre le scroll ni se superposer au contenu
   ============================================================ */

#prestablog-toc-container,
.prestablog-toc,
.prestablog-toc-wrapper,
.float-toc,
.toc-fixed,
.toc-wrapper {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    z-index: auto !important;
    max-height: none !important;
    overflow: visible !important;
    width: auto !important;
    max-width: 100% !important;
}

/* Empêcher le TOC de dépasser de son conteneur */
#prestablog-toc-container {
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Supprimer tout comportement "placeholder" qui pousserait le contenu */
.toc-placeholder {
    display: none !important;
    height: 0 !important;
}

/* ============================================================
   ⭐ FIX 2 : ÉTOILES JAUNES PARTOUT (y compris sous le titre)
   Force la couleur jaune sur TOUTES les étoiles de notation
   dans tout le module PrestaBlog
   ============================================================ */

/* Conteneur de notation en haut de l'article (sous le titre) */
#prestablogfront .rating,
.prestablog .rating,
#prestablog_article .rating,
.prestablog_article .rating,
.info_blog .rating,
.prestablog .prestablogdat + *,
.prestablog .date_blog-cat + * {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* TOUTES les étoiles Material Icons dans PrestaBlog — jaune doré */
#prestablogfront .material-icons[class*="rating"],
#prestablogfront i.material-icons[data-rating],
.prestablog .material-icons[class*="rating"],
.prestablog i.material-icons[data-rating],
.blogitems .material-icons[class*="star"],
.news .material-icons[class*="star"],
.info_blog .material-icons[class*="rating"] {
    color: #ffc107 !important;
}

/* Approche "brute force" : toutes les étoiles dans ces zones */
/* → ces zones contiennent UNIQUEMENT des étoiles */
#prestablogfront .prestablog > div > .material-icons,
.prestablog .prestablograting .material-icons,
.prestablog [class*="rating"] .material-icons,
.prestablograting i,
.rating_blog i.material-icons {
    color: #ffc107 !important;
    font-size: 18px !important;
}

/* Plus robuste : cibler les étoiles par leur valeur texte via un attribut data */
#prestablogfront .material-icons:empty,
.prestablog .material-icons:empty {
    /* Les icônes vides utilisent souvent ::before avec un caractère */
    color: inherit;
}

/* Cible spécifique : les étoiles dans les info_blog (cartes d'articles) */
.info_blog i.material-icons,
.info_blog .material-icons {
    color: #ffc107 !important;
    font-size: 18px !important;
}

/* ⭐ CAS SPÉCIAL : étoiles affichées sous le titre de l'article */
/* PrestaBlog affiche souvent : <div class="prestablog_article_note"> ou similar */
#prestablog_article .material-icons,
.prestablog_article .material-icons,
.article_note .material-icons,
.note_article .material-icons,
.prestablog_note .material-icons,
.note_blog .material-icons {
    color: #ffc107 !important;
    font-size: 18px !important;
}

/* Protection : on garde les icônes breadcrumb en blanc/noir */
.prestablog-nav-top .material-icons,
.breadcrumb .material-icons,
nav.breadcrumb .material-icons {
    color: #fff !important;
    font-size: 22px !important;
}

/* Protection : icônes du TOC (livre, flèche toggle) en vert/blanc */
#prestablog-toc-container .prestablog-toc-title .material-icons,
.prestablog-toc-title .material-icons {
    color: var(--rt-green) !important;
}

.prestablog-toc-toggle .material-icons,
#prestablog-toc-container button .material-icons {
    color: #fff !important;
}

/* ============================================================
   📐 FIX 3 : TOC LARGEUR CONTRÔLÉE
   Empêcher le TOC de prendre toute la largeur de l'écran
   ============================================================ */

#prestablog-toc-container,
.prestablog-toc {
    width: 100% !important;
    max-width: 800px !important;
    margin: 25px auto !important;
}

/* Liste du TOC : largeur contrôlée */
#prestablog-toc-container .prestablog-toc-list,
.prestablog-toc-list {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 !important;
}

.prestablog-toc-item,
#prestablog-toc-container li {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Liens du TOC : ne pas déborder */
.prestablog-toc-link,
#prestablog-toc-container a {
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    display: block !important;
}

/* ============================================================
   🎨 BONUS : Améliorer le titre du TOC
   ============================================================ */
.prestablog-toc-title,
#prestablog-toc-container > .prestablog-toc-title,
#prestablog-toc-container h2,
#prestablog-toc-container h3 {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    margin-bottom: 15px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid rgba(26, 158, 95, 0.2) !important;
}

/* ============================================================
   🔒 DERNIER RECOURS : Reset total du floating
   Si le module PrestaBlog injecte du JS qui force position:fixed,
   on neutralise avec !important
   ============================================================ */

body #prestablog-toc-container,
body .prestablog-toc,
body .prestablog-toc-wrapper,
body .float-toc,
body .toc-fixed {
    position: static !important;
    float: none !important;
    clear: both !important;
}
/* ============================================================
   PATCH v3.3 — Cohérence avec le site RecycleTek
   À AJOUTER À LA FIN DE custom-blog.css
   
   Corrections :
   1. Remplacement des boutons violets par vert RecycleTek
      (cohérent avec le bouton "Ajouter au panier" du site)
   2. Produits associés : design élégant, cartes blanches,
      images taille normale, ombres douces
   ============================================================ */

/* ============================================================
   🟢 FIX 1 : BOUTONS EN VERT RECYCLETEK (au lieu de violet)
   Copie exacte du style du bouton "Ajouter au panier" du site
   ============================================================ */

/* Bouton "Noter l'article" */
a[href*="note"],
button[class*="note"],
a.articleslinks[href*="note"],
#prestablogfront .articleslinks,
.articleslinks,
a.articleslinks {
    display: inline-block !important;
    background: var(--rt-green) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 12px 28px !important;
    font-family: var(--rt-font) !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    letter-spacing: 0.02em !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    box-shadow: 0 5px 18px rgba(26, 158, 95, 0.28) !important;
}

a[href*="note"]:hover,
button[class*="note"]:hover,
.articleslinks:hover,
a.articleslinks:hover {
    background: var(--rt-green-dark) !important;
    color: #fff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 24px rgba(26, 158, 95, 0.4) !important;
    text-decoration: none !important;
}

/* Bouton "Soumettre" du formulaire commentaire */
#prestablog-comment button[type="submit"],
#prestablog-comment input[type="submit"],
.comment button[type="submit"],
.comment input[type="submit"],
form[id*="comment"] button[type="submit"],
form[id*="prestablog"] button[type="submit"] {
    background: var(--rt-green) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 12px 32px !important;
    font-family: var(--rt-font) !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    letter-spacing: 0.02em !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 5px 18px rgba(26, 158, 95, 0.28) !important;
}

#prestablog-comment button[type="submit"]:hover,
#prestablog-comment input[type="submit"]:hover,
.comment button[type="submit"]:hover {
    background: var(--rt-green-dark) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 24px rgba(26, 158, 95, 0.4) !important;
}

/* Bouton "Tous Les Articles" sur la page liste */
#prestablog_home .articleslinks,
aside .articleslinks,
.articleslinks:not([href*="note"]) {
    background: var(--rt-green) !important;
    color: #fff !important;
    border-radius: 50px !important;
    padding: 12px 28px !important;
    box-shadow: 0 5px 18px rgba(26, 158, 95, 0.28) !important;
    font-weight: 700 !important;
}

#prestablog_home .articleslinks:hover,
aside .articleslinks:hover {
    background: var(--rt-green-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26, 158, 95, 0.4) !important;
}

/* ============================================================
   🛒 FIX 2 : PRODUITS ASSOCIÉS — Design élégant
   Cartes blanches, images normales, ombres subtiles
   ============================================================ */

/* Conteneur global de la section "Produits associés" */
#prestablogfront .related_blog_product,
.prestablog .related_blog_product {
    margin: 40px 0 !important;
    padding: 30px 25px !important;
    background: #ffffff !important;
    border: 1px solid var(--rt-border) !important;
    border-radius: var(--rt-radius) !important;
    box-shadow: var(--rt-shadow) !important;
}

/* Titre "Produits associés" */
#prestablogfront .related_blog_product h3,
#prestablogfront .related_blog_product h4,
.prestablog .related_blog_product h3,
.prestablog .related_blog_product h4 {
    color: var(--rt-dark) !important;
    font-size: 1.25rem !important;
    margin: 0 0 25px 0 !important;
    font-family: var(--rt-font) !important;
    font-weight: 700 !important;
    padding-bottom: 12px !important;
    border-bottom: 2px solid var(--rt-green) !important;
    display: inline-block !important;
    position: relative;
}

/* Grid/Container des produits (flex ou grid) */
#prestablogfront .related_blog_product > div,
#prestablogfront .related_blog_product ul,
.prestablog .related_blog_product > div {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 15px !important;
    justify-content: flex-start !important;
    padding: 0 !important;
    list-style: none !important;
}

/* Chaque "carte" produit individuelle */
#prestablogfront .related_blog_product > div > *,
#prestablogfront .related_blog_product > ul > li,
.prestablog .related_blog_product > div > *,
.related_blog_product .product-item,
.related_blog_product [class*="product"] {
    background: #fff !important;
    border: 1px solid var(--rt-border) !important;
    border-radius: var(--rt-radius-sm) !important;
    padding: 12px !important;
    transition: all 0.3s ease !important;
    overflow: hidden !important;
    flex: 0 0 auto !important;
    max-width: 170px !important;
    text-align: center !important;
    box-shadow: 0 2px 8px rgba(13, 45, 58, 0.04) !important;
}

#prestablogfront .related_blog_product > div > *:hover,
#prestablogfront .related_blog_product > ul > li:hover,
.prestablog .related_blog_product > div > *:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 24px rgba(26, 158, 95, 0.15) !important;
    border-color: var(--rt-green-light) !important;
}

/* Images des produits : taille normale, pas géantes */
#prestablogfront .related_blog_product a img,
#prestablogfront .related_blog_product img,
.prestablog .related_blog_product img {
    width: 100% !important;
    height: auto !important;
    max-width: 140px !important;
    max-height: 140px !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto 10px auto !important;
    border: none !important;
    border-radius: 6px !important;
    background: #fafafa !important;
    padding: 8px !important;
    transition: transform 0.3s ease !important;
}

#prestablogfront .related_blog_product a:hover img,
.prestablog .related_blog_product a:hover img {
    transform: scale(1.05) !important;
    border: none !important;
}

/* Nom du produit */
#prestablogfront .related_blog_product .product_name_blog,
#prestablogfront .related_blog_product .titre_product_blog,
.related_blog_product .product_name_blog,
.related_blog_product .titre_product_blog {
    color: var(--rt-dark) !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
    margin: 8px 0 4px 0 !important;
    display: block !important;
    text-align: center !important;
    font-family: var(--rt-font) !important;
    /* Limite à 2 lignes max */
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    min-height: 32px !important;
}

/* Liens produits — propres */
#prestablogfront .related_blog_product a,
.prestablog .related_blog_product a {
    text-decoration: none !important;
    color: var(--rt-dark) !important;
    display: block !important;
    transition: color 0.25s ease !important;
}

#prestablogfront .related_blog_product a:hover,
.prestablog .related_blog_product a:hover {
    color: var(--rt-green) !important;
    text-decoration: none !important;
}

/* ============================================================
   💰 PRIX DES PRODUITS (si affiché)
   ============================================================ */
.related_blog_product .price,
.related_blog_product [class*="price"] {
    color: var(--rt-green-dark) !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    margin-top: 6px !important;
    display: block !important;
    font-family: var(--rt-font) !important;
}

/* ============================================================
   📱 RESPONSIVE : produits associés sur mobile
   ============================================================ */
@media (max-width: 768px) {
    #prestablogfront .related_blog_product {
        padding: 20px 15px !important;
    }

    #prestablogfront .related_blog_product > div > *,
    #prestablogfront .related_blog_product > ul > li {
        max-width: calc(50% - 8px) !important;
        flex: 0 0 calc(50% - 8px) !important;
    }

    #prestablogfront .related_blog_product a img {
        max-width: 120px !important;
        max-height: 120px !important;
    }
}

@media (max-width: 480px) {
    #prestablogfront .related_blog_product > div > *,
    #prestablogfront .related_blog_product > ul > li {
        max-width: calc(50% - 6px) !important;
        flex: 0 0 calc(50% - 6px) !important;
        padding: 8px !important;
    }

    #prestablogfront .related_blog_product a img {
        max-width: 100px !important;
        max-height: 100px !important;
    }

    #prestablogfront .related_blog_product .product_name_blog {
        font-size: 11px !important;
    }
}

/* ============================================================
   🎨 SECTION "Ajouter un commentaire" — Amélioration
   ============================================================ */

#prestablogfront #prestablog-comment,
.prestablog #prestablog-comment {
    background: #fff !important;
    border: 1px solid var(--rt-border) !important;
    border-radius: var(--rt-radius) !important;
    padding: 30px 25px !important;
    box-shadow: var(--rt-shadow) !important;
    margin-top: 40px !important;
}

/* Titre "Ajouter un commentaire" */
#prestablogfront #prestablog-comment h3,
#prestablogfront #prestablog-comment h4,
.prestablog #prestablog-comment h3 {
    color: var(--rt-dark) !important;
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    margin: 0 0 20px 0 !important;
    padding-bottom: 10px !important;
    border-bottom: 2px solid var(--rt-green) !important;
    display: inline-block !important;
    font-family: var(--rt-font) !important;
}
