/* ==========================================================================
   VARIABLES SPÉCIFIQUES SINGLE (Les couleurs héritent de hf.css)
   ========================================================================== */
:root {
    --single-radius: 12px;
    --single-shadow: 0 2px 8px rgba(0,0,0,0.06);
    --color-green-a11y: #167339; /* Vert sombre pour valider le contraste WCAG */
    --color-green-a11y-dark: #0f5132; /* Vert encore plus sombre au survol */
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--color-bg-light); /* Hérité de hf.css */
    color: var(--color-text-primary);  /* Hérité de hf.css */
    line-height: 1.6; /* Amélioration de la lisibilité globale */
    padding-bottom: 70px;
}

/* ==========================================================================
   CONTAINER PRINCIPAL
   ========================================================================== */
.single-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 15px 10px;
}

/* ==========================================================================
   HEADER DE L'ARTICLE
   ========================================================================== */
.single-header {
    background: #fff;
    border-radius: var(--single-radius);
    padding: 16px;
    margin-bottom: 24px; /* Espace augmenté sous le header */
    box-shadow: var(--single-shadow);
}

.single-title {
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--color-text-primary);
}

/* Notation étoiles (Adapté avec le jaune Achetero) */
.single-rating {
    display: flex;
    justify-content: flex-start; /* Force l'alignement strict à gauche */
    align-items: center;
    color: var(--color-price-gold);
    font-size: 1.4rem;
    letter-spacing: 2px;
    margin-bottom: 6px;
}

.single-rating .star.full {
    color: var(--color-price-gold);
}

.single-rating .star {
    color: var(--color-border); /* Gris clair pour les étoiles vides */
}

.single-rating .star.half {
    position: relative;
    display: inline-block;
    width: 0.8em;
}

.single-rating .star.half::before {
    content: '★';
    color: var(--color-price-gold);
    position: absolute;
    left: 0;
    width: 50%;
    overflow: hidden;
    display: block; /* Sécurité pour la demi-étoile */
}

.single-rating .star.half::after {
    content: '☆';
    color: var(--color-border);
}

.meta {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: 6px;
}

/* ==========================================================================
   CONTENU DE L'ARTICLE
   ========================================================================== */
.entry-content {
    margin-top: 15px;
}

.entry-content p {
    font-size: 1.05rem;
    color: var(--color-text-primary);
    margin-bottom: 18px; /* Espace augmenté entre les paragraphes */
    line-height: 1.7;
}

.entry-content strong {
    font-weight: 700;
}

/* ==========================================================================
   GRILLE PRODUIT (IMAGE + PRIX)
   ========================================================================== */
.product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 24px;
    margin-bottom: 30px; /* Espace augmenté sous la grille produit */
}
/* Rend les images dans les articles responsives et esthétiques */
.img-responsive {
    max-width: 100%; /* L'image ne débordera jamais de l'écran */
    height: auto; /* Garde les bonnes proportions sans écraser l'image */
    border-radius: var(--single-radius, 12px); /* Applique tes jolis bords arrondis */
    display: block; /* Évite les petits espaces blancs sous l'image */
    margin: 20px auto; /* Ajoute un bel espace en haut et en bas, et centre l'image */
    box-shadow: 0 2px 8px rgba(0,0,0,0.06); /* Optionnel : ajoute la même petite ombre que tes autres blocs */
}

@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr 1.3fr;
    }
}

/* ==========================================================================
   IMAGE PRODUIT
   ========================================================================== */
.product-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    max-width: 100%;
    height: auto;
    padding:5px;
    border-radius: 8px;
}

/* ==========================================================================
   COLONNE PRIX
   ========================================================================== */
.price-column {
    background: #fff;
    border-radius: var(--single-radius);
    padding: 16px;
    box-shadow: var(--single-shadow);
}

.price-column h2 {
    font-size: 1.1rem;
    margin-bottom: 14px;
    color: var(--color-text-primary);
}

/* Catégorie de prix (Badges Neuf/Reconditionné) */
.price-category {
    margin-bottom: 16px;
}

.cat-badge {
    display: inline-block;
    background: #e6f9f0;
    color: var(--color-green-a11y-dark); /* Correction Accessibilité : Vert très sombre */
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.75rem;
    margin-bottom: 8px;
    text-transform: uppercase;
    border: 1px solid rgba(22, 115, 57, 0.2); /* Léger bord pour détacher la couleur */
}

/* ==========================================================================
   LIGNE D'OFFRE
   ========================================================================== */
.offer-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
    gap: 8px;
    transition: all var(--transition-speed) ease;
}

.offer-row:last-child {
    border-bottom: none;
}

.offer-row:hover {
    background: var(--color-bg-light);
    border-radius: 8px;
    padding-left: 8px;
    padding-right: 8px;
    margin: 0 -8px;
}

/* Partie gauche */
.offer-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 150px;
}

.offer-logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
    flex-shrink: 0;
    background-color: var(--color-text-primary); /* Par défaut noir */
}

.offer-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.offer-store {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* Partie droite */
.offer-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.offer-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-green-a11y); /* Correction couleur prix pour meilleure lisibilité */
}

.offer-status {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* ==========================================================================
   BOUTON ACHETER
   ========================================================================== */
.btn-acheter,
.entry-content .btn-acheter,
.entry-content a.btn-acheter {
    background: var(--color-green-a11y) !important; /* Correction Accessibilité : Vert sombre */
    color: #ffffff !important; /* Texte 100% blanc */
    border: none;
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none !important;
    white-space: nowrap;
    display: inline-block;
    text-align: center;
    transition: background var(--transition-speed) ease, transform var(--transition-speed) ease;
}

.btn-acheter:hover,
.entry-content .btn-acheter:hover {
    background: var(--color-green-a11y-dark) !important; /* S'assombrit au survol */
    color: #ffffff !important;
}

.btn-acheter:active {
    transform: scale(0.97);
}

@media (min-width: 768px) {
    .btn-acheter {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .offer-price {
        font-size: 1.4rem;
    }
    
    .offer-row {
        padding: 12px 0;
    }
}

/* ==========================================================================
   ENCADRÉ "POUR QUI ?"
   ========================================================================== */
.pourqui-box {
    background: linear-gradient(135deg, #eafff6, #f0fcf9);
    border: 2px solid var(--color-brand-green);
    border-radius: var(--single-radius);
    padding: 16px;
    margin: 35px 0; /* Espace considérablement augmenté */
}

.pourqui-box h2 {
    margin-bottom: 8px; /* Corrigé depuis l'inline */
    color: var(--color-green-a11y-dark); /* Corrigé depuis l'inline */
    font-size: 1.1rem; /* Corrigé depuis l'inline */
    border: none;
    padding-left: 0;
}

.pourqui-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.pourqui-item {
    background: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-text-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

@media (min-width: 600px) {
    .pourqui-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ==========================================================================
   POINTS FORTS / POINTS FAIBLES
   ========================================================================== */
.pros-cons-box {
    background: #fff;
    border-radius: var(--single-radius);
    padding: 16px;
    margin: 35px 0; /* Espace considérablement augmenté */
    box-shadow: var(--single-shadow);
    border: 1px solid var(--color-border);
}

.pros-cons-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 600px) {
    .pros-cons-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.pros-cons-grid h2 {
    font-size: 1.05rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-primary);
    border: none;
    padding-left: 0;
}

.pros-cons-grid ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pros-cons-grid ul li {
    padding: 6px 0;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-primary);
}

.pros-cons-grid ul li:last-child {
    border-bottom: none;
}

/* Points forts */
.pros {
    background: #f6fffa;
    padding: 12px;
    border-radius: 8px;
}

.pros ul li::before {
    content: "✓ ";
    color: var(--color-green-a11y); /* Correction contraste icône */
    font-weight: 800;
    margin-right: 4px;
}

/* Points faibles */
.cons {
    background: #fff6f6;
    padding: 12px;
    border-radius: 8px;
}

.cons ul li::before {
    content: "✗ ";
    color: #d32f2f;
    font-weight: 800;
    margin-right: 4px;
}

/* ==========================================================================
   CHECK LIST (SPÉCIFICATIONS)
   ========================================================================== */
.specs-list {
    background: var(--color-bg-light);
    padding: 12px 16px;
    border-radius: var(--single-radius);
    margin: 24px 0; /* Espace augmenté */
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--color-text-primary);
}

.spec-item::before {
    content: "✅";
    font-size: 1rem;
}

/* ==========================================================================
   TABLEAU COMPARATIF
   ========================================================================== */
.table-wrap {
    overflow-x: auto;
    margin: 35px 0; /* Espace augmenté */
}

table {
    width: 100%;
    min-width: 500px;
    border-collapse: collapse;
    background: white;
    border-radius: var(--single-radius);
    overflow: hidden;
    box-shadow: var(--single-shadow);
}

th {
    background: var(--color-green-a11y); /* Correction contraste Entête Tableau */
    color: white;
    padding: 14px 12px;
    text-align: left;
    font-weight: 700;
    font-size: 0.95rem;
}

td {
    padding: 12px;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.95rem;
    color: var(--color-text-primary);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: var(--color-bg-light);
}

.highlight {
    background: #eafff6;
    font-weight: bold;
}

/* ==========================================================================
   SECTION ALTERNATIVES
   ========================================================================== */
.alt-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
    margin: 25px 0 35px 0; /* Espace augmenté */
}

@media (min-width: 600px) {
    .alt-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.alt-card {
    background: white;
    padding: 14px;
    border-radius: 8px;
    border-left: 4px solid var(--color-brand-green);
    box-shadow: var(--single-shadow);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.alt-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.alt-card-img {
    width: 65px;
    height: auto;
    border-radius: 6px;
    flex-shrink: 0;
    object-fit: contain;
}

.alt-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.alt-card-content h3 {
    font-size: 1rem;
    margin: 0;
    line-height: 1.3;
    color: var(--color-text-primary);
}

.alt-card-content p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin: 0;
}

.alt-card-btn {
    align-self: flex-end;
}

/* ==========================================================================
   SECTION FAQ
   ========================================================================== */
.faq-item {
    background: white;
    padding: 14px;
    margin-bottom: 14px; /* Espace augmenté entre les questions */
    border-radius: 8px;
    box-shadow: var(--single-shadow);
    transition: box-shadow var(--transition-speed) ease;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.faq-q {
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    color: var(--color-text-primary);
    font-size: 1.05rem;
}

.faq-q::after {
    content: '+';
    font-size: 1.4rem;
    color: var(--color-green-a11y); /* Correction accessibilité icône + */
    transition: transform var(--transition-speed) ease;
}

.faq-q.open::after {
    content: '−';
    transform: rotate(180deg);
}

.faq-answer {
    display: none;
    margin-top: 10px;
    color: var(--color-text-muted);
    border-top: 1px solid var(--color-border);
    padding-top: 10px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.faq-answer.open {
    display: block;
}

/* ==========================================================================
   TITRES DE SECTION (H2, H3)
   ========================================================================== */
.single-main h2,
.entry-content h2 {
    font-size: 1.4rem;
    border-left: 4px solid var(--color-brand-green);
    padding-left: 10px;
    margin: 45px 0 20px; /* Grand espace au dessus des nouveaux titres H2 */
    color: var(--color-text-primary);
    font-weight: 800;
}

.single-main h3,
.entry-content h3 {
    font-size: 1.2rem;
    
    padding-left: 10px;
    margin: 30px 0 16px;
    color: var(--color-text-primary);
    font-weight: 700;
}

/* ==========================================================================
   NAVIGATION MOBILE FIXE
   ========================================================================== */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-around;
    padding: 8px 4px 12px;
    z-index: 100;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
}

.mobile-nav a {
    text-decoration: none;
    color: var(--color-text-muted);
    font-size: 0.7rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: color var(--transition-speed) ease;
}

.mobile-nav a:hover,
.mobile-nav a:focus {
    color: var(--color-green-a11y);
}

.mobile-nav a::before {
    font-size: 1.2rem;
}

@media (min-width: 769px) {
    .mobile-nav {
        display: none !important;
    }
    
    body {
        padding-bottom: 0;
    }
}

/* ==========================================================================
   RESPONSIVE - MOBILE FINE TUNING
   ========================================================================== */
@media (max-width: 480px) {
    .single-title {
        font-size: 1.4rem;
    }
    
    .offer-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .offer-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .alt-card {
        flex-direction: row; /* Aligne l'image et le texte de gauche à droite */
        align-items: center; 
        text-align: left;
        padding: 12px 10px; 
        gap: 12px; 
    }
    
    .alt-card-btn {
        align-self: flex-start;
        text-align: center;
        width: 100%; /* Permet au bouton de prendre toute la largeur sous le texte */
        padding: 8px 10px; 
        font-size: 0.75rem; 
    }
} 

/* ==========================================================================
   ✅ CLASSES UTILITAIRES & COMPOSANTS (Zéro CSS Inline)
   ========================================================================== */

/* 1. Introduction Header */
.header-intro {
    margin-top: 10px;
    font-size: 1.05rem;
    line-height: 1.6;
}

/* 2. Espacement des grandes Sections (<section>) */
.section-block {
    margin: 30px 0;
}
.section-sm {
    margin-bottom: 10px;
}

/* 3. Titres de section avec barre latérale (Pour remplacer le style inline) */
.section-title {
    font-size: 1.3rem;
    border-left: 4px solid var(--color-brand-green);
    padding-left: 10px;
    margin-bottom: 15px;
}

/* 4. Couleurs de fond pour les Logos marchands */
.bg-orange { background-color: #f07800; }
.bg-black  { background-color: #000000; }
.bg-dark   { background-color: #222222; }

/* 5. Alerte / Avertissement (Le bloc jaune) */
.alert-warning {
    background: #fff3cd;
    padding: 15px;
    border-left: 5px solid #ffc107;
    border-radius: 4px;
    font-weight: bold;
    color: #856404;
    margin: 20px 0;
}

/* 6. Textes spécifiques */
.text-danger {
    color: #d32f2f;
    font-weight: bold;
}

/* 7. Boîte de Verdict final */
.verdict-box {
    background: #fdfbf7;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0dcd3;
    margin: 30px 0;
}

.verdict-box h2 {
    border-left-color: #8c734b !important; /* Force la couleur de la barre pour le verdict */
}

.verdict-list {
    list-style: none;
    padding: 0;
}

.verdict-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #ccc;
}

.verdict-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.verdict-highlight {
    color: var(--color-green-a11y-dark);
}