/**
 * ==========================================================
 * DARK MODE VISIBILITY FIX - Global Corrections v1.0.0
 * ==========================================================
 * Complete dark mode text visibility fixes for all pages
 * Fixes contrast issues identified during comprehensive audit
 *
 * @package Forever_BE_Premium
 * @version 1.0.0
 * ==========================================================
 */

/* ==========================================================
   1. GLOBAL EXCEPTIONS FOR HERO SECTIONS
   All hero sections should maintain white/bright text
   ========================================================== */

/* Override global dark mode text rules for hero sections */
html.dark .hero-section-premium p,
html.dark .hero-section-premium span,
html.dark .hero-section-premium li,
html.dark .hero-section p,
html.dark .hero-section span,
html.dark [class*="hero"] p,
html.dark [class*="hero"] span,
html.dark [class*="hero"] li {
    color: rgba(255, 255, 255, 0.95) !important;
}

html.dark .hero-category,
html.dark [class*="hero-badge"],
html.dark [class*="hero-category"] {
    color: #fbbf24 !important;
}

html.dark .hero-title-premium,
html.dark .hero-title,
html.dark [class*="hero"] h1,
html.dark [class*="hero"] h2 {
    color: #ffffff !important;
}

html.dark .hero-desc-premium,
html.dark .hero-subtitle,
html.dark [class*="hero"] .hero-desc,
html.dark [class*="hero"] .subtitle {
    color: rgba(255, 255, 255, 0.95) !important;
}

/* ==========================================================
   2. HOMEPAGE SECTIONS - DARK MODE FIXES
   ========================================================== */

/* Trust Section */
html.dark .trust-section-marquee {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
}

html.dark .trust-card-compact {
    background: #1e293b !important;
    border-color: #475569 !important;
}

html.dark .trust-label-compact {
    color: #e2e8f0 !important;
}

html.dark .trust-sub-compact {
    color: #94a3b8 !important;
}

/* Featured Products Section */
html.dark .featured-section {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 50%, #0f172a 100%) !important;
}

html.dark .featured-subtitle {
    color: #94a3b8 !important;
}

html.dark .featured-product-card {
    background: #1e293b !important;
    border-color: #475569 !important;
}

html.dark .featured-product-title {
    color: #f1f5f9 !important;
}

html.dark .quick-cat-link {
    color: #e2e8f0 !important;
    background: #334155 !important;
}

html.dark .quick-cat-link .cat-count {
    background: rgba(251, 191, 36, 0.2) !important;
    color: #fbbf24 !important;
}

/* Testimonials Section (Homepage) */
html.dark .testimonial-card-premium {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
    border-color: #475569 !important;
}

html.dark .testimonial-text {
    color: #cbd5e1 !important;
}

html.dark .testimonial-location {
    color: #94a3b8 !important;
}

html.dark .quote-icon {
    color: rgba(251, 191, 36, 0.3) !important;
}

/* Benefits Section */
html.dark .benefit-desc-premium {
    color: rgba(255, 255, 255, 0.95) !important;
}

/* Business Opportunity Section */
html.dark .stat-overlay-number {
    color: #fbbf24 !important;
}

html.dark .stat-overlay-label {
    color: #94a3b8 !important;
}

html.dark .author-name-premium {
    color: #f1f5f9 !important;
}

html.dark .author-role-premium {
    color: #94a3b8 !important;
}

html.dark .testimonial-quote-premium {
    color: #cbd5e1 !important;
}

/* FAQ Section (Homepage) */
html.dark .faq-item-premium {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
    border-color: #475569 !important;
}

html.dark .faq-question-premium {
    color: #f1f5f9 !important;
}

html.dark .faq-answer-premium {
    color: #cbd5e1 !important;
}

html.dark .faq-question-premium svg {
    color: #94a3b8 !important;
}

/* CTA Section */
html.dark .cta-card-premium {
    background: rgba(30, 41, 59, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

html.dark .cta-desc-premium {
    color: rgba(255, 255, 255, 0.95) !important;
}

/* ==========================================================
   3. PAGE A PROPOS - DARK MODE FIXES
   ========================================================== */

html.dark .timeline__content p {
    color: #cbd5e1 !important;
}

html.dark .timeline__dot {
    background: #fbbf24 !important;
}

html.dark .timeline__year {
    color: #fbbf24 !important;
}

html.dark .about-mission__text {
    color: #cbd5e1 !important;
}

html.dark .about-mission__list li {
    color: #e2e8f0 !important;
}

html.dark .value-card__text {
    color: #cbd5e1 !important;
}

html.dark .value-card {
    background: #1e293b !important;
    border-color: #475569 !important;
}

html.dark .about-hero__stat-number {
    color: #fbbf24 !important;
}

html.dark .about-cta__button {
    background: #fbbf24 !important;
    color: #000000 !important;
}

html.dark .about-cta__button:hover {
    background: #f59e0b !important;
}

/* ==========================================================
   4. PAGE CONTACT - DARK MODE FIXES
   ========================================================== */

html.dark .contact-form {
    background: #334155 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
}

html.dark .form-group input,
html.dark .form-group select,
html.dark .form-group textarea {
    background: #1e293b !important;
    border-color: #475569 !important;
    color: #ffffff !important;
}

html.dark .form-group input::placeholder,
html.dark .form-group select::placeholder,
html.dark .form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

html.dark .form-group label {
    color: #ffffff !important;
}

html.dark .option-card {
    background: #334155 !important;
    border-color: #475569 !important;
}

html.dark .option-card__title {
    color: #f1f5f9 !important;
}

html.dark .option-card__desc,
html.dark .option-card__benefits li {
    color: #e2e8f0 !important;
}

html.dark .contact-info-item__content span {
    opacity: 0.95 !important;
}

/* ==========================================================
   5. PAGE FAQ - DARK MODE FIXES
   ========================================================== */

html.dark .faq-question {
    color: #f1f5f9 !important;
}

html.dark .faq-answer {
    color: #cbd5e1 !important;
}

html.dark .faq-item {
    background: #1e293b !important;
    border-color: #475569 !important;
}

html.dark .faq-item__question {
    color: #f1f5f9 !important;
}

html.dark .faq-item__answer {
    color: #e2e8f0 !important;
}

html.dark .category-desc {
    color: #94a3b8 !important;
}

html.dark .support-title {
    color: #f1f5f9 !important;
}

html.dark .support-hours {
    color: #94a3b8 !important;
}

html.dark .support-response {
    background: rgba(0, 98, 65, 0.4) !important;
    color: #86efac !important;
}

html.dark .popular-views {
    color: #94a3b8 !important;
}

html.dark #faq-search-results {
    background: #1e293b !important;
    color: #f1f5f9 !important;
    border-color: #475569 !important;
}

/* ==========================================================
   6. PAGE TEMOIGNAGES - DARK MODE FIXES
   ========================================================== */

html.dark .featured-author-role {
    color: #4ade80 !important;
}

html.dark .featured-transformation {
    background: linear-gradient(135deg, #0f172a 0%, #14532d 100%) !important;
}

html.dark .timeline-value {
    color: #e2e8f0 !important;
}

html.dark .timeline-label {
    color: #94a3b8 !important;
}

html.dark .breadcrumb-list {
    color: #cbd5e1 !important;
}

html.dark .breadcrumb-list a {
    color: #4ade80 !important;
}

html.dark .breadcrumb-list a:hover {
    color: #38bdf8 !important;
}

html.dark .live-counter {
    background: rgba(74, 222, 128, 0.15) !important;
    color: #4ade80 !important;
}

html.dark .support-testimonial-content {
    color: #e2e8f0 !important;
}

/* Override inline styles for testimonials */
html.dark div[style*="color:var(--text-medium)"],
html.dark div[style*="color: var(--text-medium)"] {
    color: #cbd5e1 !important;
}

html.dark div[style*="color:var(--brand-green)"],
html.dark div[style*="color: var(--brand-green)"] {
    color: #4ade80 !important;
}

html.dark h2[style*="color: var(--brand-blue)"],
html.dark h2[style*="color:var(--brand-blue)"] {
    color: #4ade80 !important;
}

/* ==========================================================
   7. LEGAL PAGES - DARK MODE FIXES (CGV, Mentions, Livraison)
   ========================================================== */

html.dark .engagement-item {
    background: #1e293b !important;
    border-color: #475569 !important;
}

html.dark .engagement-item,
html.dark .engagement-label {
    color: #f1f5f9 !important;
}

html.dark .cert-item {
    background: #334155 !important;
    color: #cbd5e1 !important;
}

html.dark .cert-label {
    color: #fbbf24 !important;
}

html.dark .card-content a {
    color: #f0d78c !important;
}

html.dark .legal-section p,
html.dark .legal-section li {
    color: #cbd5e1 !important;
}

html.dark .toc-list li a {
    color: #94a3b8 !important;
}

html.dark .toc-list li a:hover {
    background: #006241 !important;
    color: #f1f5f9 !important;
}

html.dark .contact-box {
    background: #1e293b !important;
    border-color: #475569 !important;
}

html.dark .contact-box p {
    color: #cbd5e1 !important;
}

/* Livraison page specific */
html.dark .testimonial-livraison__text {
    color: #cbd5e1 !important;
}

html.dark .testimonial-livraison__name {
    color: #f1f5f9 !important;
}

html.dark .step-item p {
    color: #cbd5e1 !important;
}

html.dark .info-card p,
html.dark .info-card li {
    color: #cbd5e1 !important;
}

/* ==========================================================
   8. SINGLE.PHP (BLOG ARTICLES) - DARK MODE FIXES
   ========================================================== */

html.dark .article-body {
    color: #cbd5e1 !important;
}

html.dark .rating-count {
    color: #94a3b8 !important;
}

/* Fix inline styles in review section */
html.dark .review-card[style*="background: #f9fafb"] {
    background: #1e293b !important;
}

html.dark .review-text[style*="color: #6b7280"] {
    color: #94a3b8 !important;
}

/* Author box inline style overrides */
html.dark .sidebar-widget h4[style*="color: #1a1a1a"] {
    color: #f1f5f9 !important;
}

html.dark .sidebar-widget p[style*="color: #6b7280"] {
    color: #94a3b8 !important;
}

/* Comment form description */
html.dark .comment-form-section p[style*="color: #4b5563"] {
    color: #94a3b8 !important;
}

/* Generic inline color overrides */
html.dark [style*="color: #6b7280"],
html.dark [style*="color:#6b7280"] {
    color: #94a3b8 !important;
}

html.dark [style*="color: #4b5563"],
html.dark [style*="color:#4b5563"] {
    color: #cbd5e1 !important;
}

html.dark [style*="color: #1a1a1a"],
html.dark [style*="color:#1a1a1a"] {
    color: #f1f5f9 !important;
}

html.dark [style*="color: #374151"],
html.dark [style*="color:#374151"] {
    color: #e2e8f0 !important;
}

/* ==========================================================
   9. LIGHT MODE CONTRAST IMPROVEMENTS
   Fix weak contrast ratios for better accessibility
   ========================================================== */

/* Improve gray text contrast in light mode */
.timeline__content p {
    color: #333333 !important;
}

.about-mission__text {
    color: #333333 !important;
}

.about-mission__list li {
    color: #222222 !important;
}

.value-card__text {
    color: #444444 !important;
}

.faq-answer {
    color: #374151 !important;
}

.popular-views {
    color: #4b5563 !important;
}

/* ==========================================================
   10. RESPONSIVE FIXES
   Ensure visibility on all screen sizes
   ========================================================== */

@media (max-width: 768px) {
    /* Mobile dark mode fixes */
    html.dark .hero-section-premium p,
    html.dark .hero-section-premium span {
        color: rgba(255, 255, 255, 0.95) !important;
    }

    html.dark .trust-card-compact {
        background: #1e293b !important;
    }

    html.dark .faq-item-premium {
        background: #1e293b !important;
    }

    html.dark .testimonial-card-premium {
        background: #1e293b !important;
    }
}

@media (max-width: 480px) {
    /* Extra small screen dark mode fixes */
    html.dark .hero-desc-premium {
        color: rgba(255, 255, 255, 0.9) !important;
    }
}

/* ==========================================================
   11. PRINT STYLES (Ensure readability when printing)
   ========================================================== */

@media print {
    * {
        background: white !important;
        color: black !important;
    }
}
