/*
Theme Name: ConnectHeart
Description: Thème WordPress premium pour site de rencontres de niche. Design moderne et élégant avec animations fluides.
Author: ConnectHeart Team
Version: 1.0.1
License: GPL v2 or later
Text Domain: connectheart
*/

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #FF6B6B;
    --primary-hover: #ff5252;
    --accent-color: #F7EFE5;
    --text-dark: #222;
    --text-gray: #666;
    --text-light: #888;
    --bg-light: #F9F9F9;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-heading: 'DM Serif Display', serif;
    --font-body: 'Lexend', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.highlight {
    color: var(--primary-color);
}

/* Utilitaires */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ================================================== */
/* == BOUTONS - NOUVELLE VERSION DYNAMIQUE == */
/* ================================================== */

.btn {
    display: inline-flex; /* On passe en flexbox */
    align-items: center; /* LA MAGIE : Centre verticalement */
    justify-content: center; /* LA MAGIE : Centre horizontalement */
    gap: 0.5rem; /* Ajoute un petit espace si vous avez une icône et du texte */
    
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                background-color 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: var(--font-body);
}

/* Style pour le bouton principal (CTA) */
.btn-primary {
    color: var(--white);
    background: linear-gradient(45deg, var(--primary-hover), var(--primary-color));
    background-size: 100% 100%;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3); /* Ombre douce basée sur la couleur primaire */
}

/* Effet de survol */
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, var(--primary-color), var(--primary-hover)); /* Dégradé inversé */
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    border-radius: inherit; /* <-- LA CORRECTION EST ICI */
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05); /* Effet de lévitation */
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:active {
    transform: translateY(0) scale(1);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

/* Style pour le bouton secondaire (bordure) */
.btn-secondary {
    background-color: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: none;
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.2);
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000; 
    transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
    padding: 1.5rem 0;
    color: var(--white);
}

.site-header.scrolled {
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    color: var(--text-dark);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo a {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: inherit;
    text-decoration: none;
    font-family: var(--font-heading);
    transition: color 0.3s ease;
}

.site-logo img {
    max-height: 40px;
    width: auto;
}

.header-right-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Menu Desktop */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.main-nav li {
    position: relative; /* Important pour le positionnement du sous-menu */
}

.main-nav a {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.main-nav a:hover {
    color: var(--primary-color);
}

/* --- NOUVEAU : Styles pour le menu déroulant --- */
.main-nav .menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform 0.3s ease;
}

/* Par défaut, la flèche utilise la couleur du texte (blanche sur transparent) */
.main-nav .menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform 0.3s ease, filter 0.3s ease;
}

/* Quand le header est scrollé, on inverse la couleur de la flèche pour la rendre noire */
.site-header.scrolled .main-nav .menu-item-has-children > a::after {
    filter: invert(100%);
}

.main-nav li:hover > a::after {
    transform: rotate(180deg);
}

.main-nav .sub-menu {
    display: block;
    position: absolute;
    top: 150%; /* Positionné en dessous du lien parent */
    left: 0;
    background: var(--white);
    color: var(--text-dark);
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    min-width: 220px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    z-index: 1001;
}

.main-nav li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    top: 100%;
}

.main-nav .sub-menu li {
    width: 100%;
}

.main-nav .sub-menu a {
    padding: 0.75rem 1.5rem;
    color: var(--text-dark);
    width: 100%;
    justify-content: space-between;
}

.main-nav .sub-menu a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

/* --- NOUVEAU : Style pour l'accordéon du menu mobile --- */
.mobile-nav li {
    position: relative; /* Nécessaire pour positionner la flèche */
}

.mobile-nav li > a {
    /* On fait de la place pour la flèche à droite */
    padding-right: 40px; 
}

.mobile-nav .sub-menu {
    list-style: none;
    padding-left: 1.5rem; /* Indentation pour les sous-éléments */
    margin-top: 1rem;
    
    /* La magie de l'accordéon : caché par défaut */
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0.4s ease, visibility 0.4s ease;
}

.mobile-nav .sub-menu li {
    margin-bottom: 1rem;
}

.mobile-nav .sub-menu a {
    font-size: 1.2rem; /* Police légèrement plus petite */
    font-weight: 500;
}

/* Style du bouton/flèche */
.submenu-toggle {
    position: absolute;
    top: 0;
    right: 0;
    width: 44px; /* Bonne zone de clic */
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

/* Quand le menu est ouvert */
.mobile-nav .menu-item-has-children.is-open > .sub-menu {
    visibility: visible;
    max-height: 500px; /* Valeur assez grande pour contenir les sous-éléments */
}

.mobile-nav .menu-item-has-children.is-open > .submenu-toggle {
    transform: rotate(180deg); /* La flèche se retourne */
}

/* Menu Mobile */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    position: relative;
    width: 24px;
    height: 24px;
    z-index: 1001; 
}

.mobile-nav-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--white);
    z-index: 999; 
    padding: 6rem 2rem 2rem;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    visibility: hidden;
    display: flex;
    flex-direction: column;
}

.mobile-nav-panel.is-open {
    transform: translateX(0);
    visibility: visible;
}

.mobile-menu-toggle .icon-open,
.mobile-menu-toggle .icon-close {
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.mobile-menu-toggle .icon-close {
    opacity: 0;
    transform: rotate(-90deg);
}
.mobile-menu-toggle.is-active .icon-open {
    opacity: 0;
    transform: rotate(90deg);
}
.mobile-menu-toggle.is-active .icon-close {
    opacity: 1;
    transform: rotate(0);
    color: var(--text-dark);
}

.mobile-nav {
    flex-grow: 1;
    overflow-y: auto;
}
.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.mobile-nav ul li {
    margin-bottom: 1.5rem;
}
.mobile-nav a {
    color: var(--text-dark);
    font-size: 1.5rem;
    font-weight: 600;
    text-decoration: none;
}

.mobile-panel-footer {
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid #e5e5e5;
    flex-shrink: 0;
}
.mobile-panel-cta {
    margin-bottom: 2rem;
}
.mobile-panel-cta .btn {
    display: block;
    text-align: center;
    width: 100%;
}
.mobile-panel-socials {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}
.mobile-panel-socials a {
    color: var(--text-gray);
    transition: var(--transition);
}
.mobile-panel-socials a:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Styles responsives pour le header */
@media (max-width: 992px) {
    .main-nav {
        display: none;
    }
    .mobile-menu-toggle {
        display: block;
    }
}

/* Bouton Profil */
.btn-profile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: transparent;
    border: 2px solid var(--white);
    color: var(--white);
    transition: all 0.3s ease;
}
.btn-profile:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    transform: scale(1.1);
}
.site-header.scrolled .btn-profile {
    border-color: var(--text-dark);
    color: var(--text-dark);
}
.site-header.scrolled .btn-profile:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

/* ================================================== */
/* == STYLES SPÉCIFIQUES : HERO HELLOWATT (CORRIGÉ) == */
/* ================================================== */

.hero-interactive {
    display: flex;
    flex-direction: column; /* Aligne les enfants verticalement */
    justify-content: center; /* Centre le contenu verticalement */
    min-height: 90vh;
    padding-top: 120px; /* LA CORRECTION CLÉ : Espace pour ne pas toucher le header */
    padding-bottom: 4rem;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    color: var(--white);
}

#hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: 100%;
    z-index: 0;
    object-fit: cover;
}

.hero-interactive .hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 1;
}

.hero-interactive .container {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-interactive .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centre tout horizontalement */
    gap: 3rem; /* Espace entre le bloc de texte et le bloc de cartes */
}

.hero-interactive .hero-text {
    text-align: center;
    max-width: 700px;
}

.hero-interactive .hero-text h1 {
    font-size: clamp(3rem, 6vw, 4.5rem);
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    line-height: 1.1;
}

.hero-interactive .hero-text p {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.hero-social-proof {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center; /* Centre la preuve sociale */
    gap: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.hero-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-rating .stars {
    color: #f8ce0b;
}

.hero-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 colonnes sur desktop */
    gap: 1rem;
    width: 100%;
}

.hero-card {
    background: var(--white);
    color: var(--text-dark);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    border: 1px solid transparent;
}

.hero-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.hero-card-icon {
    width: 2.5rem;
    height: 2.5rem;
    margin: 0 auto 0.75rem;
    color: var(--primary-color);
}

.hero-card-title {
    font-weight: 600;
    font-family: var(--font-body);
    font-size: 1.1rem;
    margin: 0;
}

.hero-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Responsive pour les cartes */
@media (max-width: 992px) {
    .hero-cards-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 colonnes sur tablette */
    }
}

@media (max-width: 768px) {
    .hero-cards-grid {
        /* LA CORRECTION EST ICI : On passe à 2 colonnes */
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem; /* On réduit un peu l'espace entre les cartes */
    }

    .hero-card {
        padding: 1rem; /* On réduit un peu le padding pour gagner de la place */
    }

    .hero-card-title {
        font-size: 1rem; /* On peut réduire légèrement la police du titre */
    }
}

/* Social Proof */
.social-proof {
    background: var(--white);
    padding: 3rem 0;
    border-bottom: 1px solid #e5e5e5;
}
.social-proof-content {
    text-align: center;
}
.social-proof h3 {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 2rem;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.media-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3.5rem;
    flex-wrap: wrap;
}
.media-logo img {
    max-height: 35px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: var(--transition);
}
.media-logo a:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* Features (Utilisé pour "Comment ça marche") */
.features-section {
    padding: 5rem 0;
    background: var(--bg-light);
}
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}
.section-header h2 {
    margin-bottom: 1rem;
}
.section-header p {
    font-size: 1.25rem;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

/* Staggered Content (Utilisé pour "Pourquoi nous choisir") */
.staggered-section {
    padding: 5rem 0;
    background: var(--white);
}
.staggered-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 5rem;
}
.staggered-block:last-child { margin-bottom: 0; }
.staggered-block.reverse { direction: rtl; }
.staggered-block.reverse > * { direction: ltr; }
.staggered-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
}
.staggered-text h3 { margin-bottom: 1.5rem; }
.staggered-text p {
    font-size: 1.125rem;
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}
.feature-list { list-style: none; padding: 0; }
.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--text-gray);
}
.feature-list .check-icon {
    color: var(--primary-color);
    flex-shrink: 0;
}
.section-cta { margin-top: 2rem; }


/* Testimonials Section */
.testimonials-section {
    background-color: #1a1a1a;
    color: var(--white);
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}
.testimonials-section .section-header h2 { color: var(--white); }
.testimonial-slider {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}
.testimonial-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.testimonial-slide {
    flex: 0 0 100%;
    box-sizing: border-box;
    padding: 2rem;
    text-align: center;
    position: relative;
}
.quote-icon {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.05);
    z-index: 1;
}
.quote-text {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-style: italic;
    line-height: 1.4;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}
.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    position: relative;
    z-index: 2;
}
.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}
.author-details { text-align: left; }
.author-details cite { font-weight: 700; font-style: normal; display: block; }
.author-details span { font-size: 0.9rem; opacity: 0.7; }
.testimonial-slider .slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}
.testimonial-slider .slider-nav:hover { background: var(--primary-color); border-color: var(--primary-color); }
.testimonial-slider .slider-nav.prev { left: 1rem; }
.testimonial-slider .slider-nav.next { right: 1rem; }


/* Blog Promo Section */
.blog-promo-section {
    padding: 5rem 0;
    background: var(--bg-light);
}
.blog-promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}
.blog-promo-card {
    display: block;
    position: relative;
    min-height: 450px;
    border-radius: 1.5rem;
    overflow: hidden;
    padding: 2rem;
    color: var(--white);
    text-decoration: none;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.blog-promo-card:hover { transform: scale(1.03); box-shadow: var(--shadow-xl); }
.promo-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.1) 60%, rgba(0,0,0,0) 100%);
    z-index: 1;
    transition: background 0.3s ease;
}
.blog-promo-card:hover .promo-card-overlay { background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.2) 60%, rgba(0,0,0,0) 100%); }
.promo-card-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.promo-card-content h3 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    margin-bottom: 0.5rem;
    color: var(--white);
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}
.promo-card-content p {
    font-size: 1rem;
    line-height: 1.5;
    opacity: 0.9;
    margin-bottom: 0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* --- NOUVEAU : Styles pour le 3ème bloc promo (Rencontres locales) --- */

/* Ajustement de la grille pour 3 colonnes sur desktop */
@media (min-width: 992px) {
    .blog-promo-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Overlay de carte stylé */
.promo-card-map-overlay {
    position: absolute;
    inset: 0;
    background-image: url('https://www.transparenttextures.com/patterns/subtle-carbon.png'); /* Texture subtile, vous pouvez changer l'URL */
    background-size: auto;
    opacity: 0.05;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.blog-promo-card.has-special-overlay:hover .promo-card-map-overlay {
    opacity: 0.1;
}

/* Positionnement de l'icône GPS */
.promo-card-content h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.promo-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Assurer que le contenu texte est toujours au-dessus */
.promo-card-overlay {
    z-index: 2;
}
.promo-card-content {
    z-index: 3;
}

/* ================================================== */
/* == STYLES SPÉCIFIQUES : HOMEPAGE COMPARATEUR == */
/* ================================================== */

/* 1. Hero revu */
.hero-comparator .hero-text {
    max-width: 700px;
    margin: 0 auto;
}

/* --- NOUVEAU : Section des Niches (Carrousel dynamique) --- */
.niche-carousel-section {
    padding: 5rem 0;
    background: var(--white);
    overflow-x: hidden; /* <-- LA CORRECTION EST ICI */
    position: relative; /* Bonne pratique pour les conteneurs avec overflow */
}

.niche-carousel-container {
    position: relative;
}

/* Conteneur pour l'effet de fondu sur les côtés */
.niche-carousel-wrapper {
    position: relative;
}
.niche-carousel-wrapper::before,
.niche-carousel-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50px;
    z-index: 2;
    pointer-events: none; /* Permet de cliquer à travers */
}
.niche-carousel-wrapper::before {
    left: 0;
    background: linear-gradient(to right, var(--white), transparent);
}
.niche-carousel-wrapper::after {
    right: 0;
    background: linear-gradient(to left, var(--white), transparent);
}

.niche-carousel-track {
    display: flex;
    gap: 1.5rem;
    padding: 1rem 10px; /* Un peu de padding pour l'ombre */
    overflow-x: auto;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.niche-carousel-track::-webkit-scrollbar {
    display: none;
}

.niche-carousel-item {
    flex: 0 0 auto;
    width: 200px;
    padding: 1.5rem;
    background: var(--accent-color);
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    transition: var(--transition);
    border: 2px solid transparent;
}

.niche-carousel-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.niche-item-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}

.niche-item-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.niche-item-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
}

/* Style des flèches de navigation */
.niche-carousel-container .carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid #e0e0e0;
    box-shadow: var(--shadow);
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.niche-carousel-container .carousel-nav:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

.niche-carousel-container .carousel-nav.prev { left: -22px; }
.niche-carousel-container .carousel-nav.next { right: -22px; }

@media (max-width: 768px) {
    .niche-carousel-container .carousel-nav {
        display: none;
    }
    .niche-carousel-wrapper::before,
    .niche-carousel-wrapper::after {
        display: none; /* On retire le fondu sur mobile */
    }
}

/* 3. Section "Comment ça marche" */
.how-it-works-section .feature-card {
    position: relative;
    padding-top: 4rem;
    text-align: left;
}

.how-it-works-section .feature-card::before {
    content: attr(data-step);
    position: absolute;
    top: 1.5rem;
    left: 2rem;
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--accent-color);
}

/* --- Section Top Plateformes (Style unifié en grille) --- */

/* On applique ces styles aux deux sections */
.top-platforms-section,
.category-top-apps {
    padding: 5rem 0;
    background: var(--bg-light);
}

.top-apps-header {
    background-color: var(--accent-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 3rem;
}

.top-apps-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.top-apps-title .highlight {
    color: var(--primary-color);
}

.top-apps-subtitle {
    font-size: 1.1rem;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

.top-apps-subtitle strong {
    color: var(--text-dark);
}

.top-apps-reassurance {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-gray);
}

/* --- Grille de cartes (s'applique partout) --- */
.platforms-list {
    display: grid;
    grid-template-columns: 1fr; /* 1 colonne sur mobile */
    gap: 2.5rem; /* Un peu plus d'espace */
    counter-reset: platform-counter;
}

@media (min-width: 768px) {
    .platforms-list {
        grid-template-columns: repeat(2, 1fr); /* 2 colonnes sur tablette */
    }
}

@media (min-width: 992px) {
    .platforms-list {
        grid-template-columns: repeat(3, 1fr); /* 3 colonnes sur desktop */
    }
}

.platform-card {
    position: relative;
    counter-increment: platform-counter;
    display: flex;
    flex-direction: column;
    text-align: center;
    background: var(--white);
    padding: 2.5rem 1.5rem 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid #e0e0e0;
}

.platform-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.platform-card::before {
    content: counter(platform-counter);
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    box-shadow: var(--shadow-lg);
    z-index: 2;
}

.platform-logo {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
}

.platform-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.platform-details {
    flex-grow: 1;
}

.platform-details h3 {
    margin: 0 0 0.25rem;
    font-size: 1.25rem;
}

.platform-details p {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    color: var(--text-gray);
}

.platform-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.platform-tags span {
    background: var(--accent-color);
    color: var(--text-dark);
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
}

.platform-rating {
    margin-top: 1.5rem;
}

.rating-value {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.rating-stars {
    --percent: calc(var(--rating) / 5 * 100%);
    display: inline-block;
    font-size: 1.2rem;
    font-family: Times;
    line-height: 1;
    color: #ccc;
    position: relative;
}
.rating-stars::before {
    content: '★★★★★';
    position: absolute;
    left: 0;
    top: 0;
    width: var(--percent);
    overflow: hidden;
    color: #f8ce0b;
}

.platform-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
    width: 100%;
}

.platform-actions .btn {
    width: 100%;
    justify-content: center;
}

/* --- NOUVEAU : Style pour la première plateforme (Halo de Lumière) --- */

/* On cible la première carte de la liste */
.platforms-list .platform-card:first-child {
    /* On retire la bordure grise de base */
    border: none; 
    
    /* On crée une fausse bordure avec un padding et un fond en dégradé */
    position: relative;
    background: linear-gradient(var(--white), var(--white)) padding-box,
                linear-gradient(135deg, var(--primary-color), var(--accent-color)) border-box;
    border: 2px solid transparent;
    
    /* On ajoute une ombre colorée subtile */
    box-shadow: 0 10px 30px -10px hsla(var(--primary-hue, 0), 80%, 70%, 0.5);
}

/* On ajoute une variable HUE pour la couleur primaire (si elle n'existe pas) */
:root {
    --primary-hue: 0; /* Valeur par défaut, sera mise à jour par JS */
}

/* Création du badge "Meilleur Choix" */
.platforms-list .platform-card:first-child::after {
    content: 'Meilleur Choix';
    position: absolute;
    top: 1.5rem;
    right: -10px; /* Légèrement en dehors de la carte */
    
    background: var(--primary-color);
    color: var(--white);
    
    padding: 0.4rem 1rem;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: var(--shadow);
    
    /* Effet de "ruban" */
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%, 10% 50%);
}

/* On s'assure que le numéro de classement reste visible */
.platforms-list .platform-card:first-child::before {
    z-index: 3;
}

/* Ajustement pour mobile */
@media (max-width: 768px) {
    .platforms-list .platform-card:first-child::after {
        top: 1.5rem;
        right: 1.5rem;
        left: auto;
        transform: none;
        clip-path: none; /* On retire l'effet ruban pour plus de simplicité */
        border-radius: 50px;
    }
}

/* --- FIN DES STYLES SPÉCIFIQUES --- */


/* Footer */
.site-footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 4rem 0 2rem;
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}
.footer-section h4 { margin-bottom: 1rem; font-family: var(--font-heading); }
.footer-section ul { list-style: none; padding: 0; }
.footer-section ul li { margin-bottom: 0.5rem; }
.footer-section a { color: #ccc; text-decoration: none; transition: var(--transition); }
.footer-section a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid #444; padding-top: 2rem; text-align: center; color: #ccc; }
.footer-logo .custom-logo-link img, .footer-logo .custom-logo-link svg { max-height: 40px; width: auto; }
.footer-logo .custom-logo-link svg path { fill: var(--white); }
.footer-logo a { font-size: 1.5rem; font-weight: 700; font-family: var(--font-heading); color: var(--white); text-decoration: none; }
.footer-socials { margin-top: 1.5rem; }
.footer-social-title { font-size: 1rem; font-weight: 600; margin-bottom: 0.75rem; font-family: var(--font-body); color: var(--white); }
.footer-social-links { display: flex; align-items: center; gap: 1rem; }
.footer-social-links a { color: #ccc; text-decoration: none; transition: var(--transition); }
.footer-social-links a:hover { color: var(--primary-color); transform: translateY(-3px); }
.footer-social-links svg { width: 24px; height: 24px; }


/* Styles pour les Templates de Contenu (Single, Page, Archive) */
.main-content-area {
    display: flex;
    gap: 3rem;
    padding-top: 120px;
    padding-bottom: 4rem;
}
.site-main { flex: 2; min-width: 0; }
.sidebar-cta { flex: 1; position: sticky; top: 120px; }

/* ... (Le reste de vos styles pour single, page, archive, etc. reste ici) ... */


/* Responsive Général */
@media (max-width: 768px) {
    .staggered-block {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .staggered-block.reverse {
        direction: ltr;
    }
}

/* ================================================== */
/* == STICKY CTA BAR (Version finale avec flèches responsives) == */
/* ================================================== */

.sticky-cta-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(26, 26, 26, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 998;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    visibility: hidden;
}

.sticky-cta-bar.is-visible {
    transform: translateY(0);
    visibility: visible;
}

.sticky-cta-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sticky-cta-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--white);
    /* On ajoute flex pour bien aligner la flèche */
    display: flex;
    align-items: center;
}

/* ▼▼▼ AJOUT DES FLÈCHES RESPONSIVES ▼▼▼ */

/* Style par défaut (Desktop) */
.sticky-cta-text::before {
    display: none; /* Pas de flèche au début sur desktop */
}

.sticky-cta-text::after {
    content: '→'; /* Flèche de droite */
    display: inline-block;
    margin-left: 0.75rem; /* Espace entre le texte et la flèche */
    transition: transform 0.3s ease;
}

/* Petit effet au survol de la barre */
.sticky-cta-bar:hover .sticky-cta-text::after {
    transform: translateX(5px);
}

/* Style du bouton (adouci) */
.sticky-cta-bar .btn {
    background: var(--primary-color);
    color: var(--white);
    font-weight: 700;
    border: none;
    box-shadow: 0 0 5px var(--primary-color), 0 0 15px rgba(255, 107, 107, 0.3);
    transition: all 0.3s ease;
}

.sticky-cta-bar .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 8px var(--primary-color), 0 0 20px rgba(255, 107, 107, 0.4);
}

/* Styles pour le mobile */
@media (max-width: 768px) {
    .sticky-cta-bar {
        padding: 0.75rem 0;
    }

    .sticky-cta-content {
        flex-direction: column;
        gap: 0.5rem;
    }

    .sticky-cta-text {
        font-size: 0.9rem; /* Police un peu plus grande pour la lisibilité */
        font-family: var(--font-body);
        font-weight: 600;
        color: rgba(255, 255, 255, 0.9);
    }

    /* On affiche la flèche du début sur mobile */
    .sticky-cta-text::before {
        content: '↓'; /* Flèche du bas */
        display: inline-block;
        margin-right: 0.5rem; /* Espace après la flèche */
    }

    /* On change la flèche de fin sur mobile */
    .sticky-cta-text::after {
        content: '↓'; /* Flèche du bas */
        margin-left: 0.5rem; /* Espace avant la flèche */
    }

    /* On retire l'effet de survol sur mobile */
    .sticky-cta-bar:hover .sticky-cta-text::after {
        transform: none;
    }

    .sticky-cta-bar .btn {
        width: 90%;
        max-width: 320px;
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
}


/* Logos Header (clair/sombre) */
.site-logo img {
    max-height: 40px;
    width: auto;
    transition: opacity 0.3s ease;
}
.logo-dark { display: none; }
.site-header.scrolled .logo-light { display: none; }
.site-header.scrolled .logo-dark { display: block; }

/* ================================================== */
/* == STYLES : IMPACT COMMUNAUTAIRE (Fond Noir) == */
/* ================================================== */

.love-impact-section {
    background: #1a1a1a; /* FOND NOIR */
    padding: 6rem 1rem;
    font-family: var(--font-body);
    overflow: hidden; /* Pour les animations */
}

.love-impact-section .container { 
    max-width: 800px; /* Un peu plus resserré pour l'impact */
    width: 100%; 
    margin: 0 auto; 
}

.main-title { 
    text-align: center; 
    margin-bottom: 4rem; 
}

.main-title h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--white); /* Texte blanc */
    margin-bottom: 1rem;
    line-height: 1.2;
    font-family: var(--font-heading);
}

.title-underline { 
    width: 6rem; 
    height: 4px; 
    background: var(--primary-color); /* Couleur du thème */
    margin: 0 auto; 
    border-radius: 2px; 
}

.counter-container { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    margin-bottom: 4rem; 
    position: relative; 
}

.circular-progress-wrapper { 
    position: relative; 
    width: 320px; 
    height: 320px; 
}

.progress-ring { 
    width: 100%; 
    height: 100%; 
    transform: rotate(-90deg); 
    filter: drop-shadow(0 0 20px var(--primary-hover)); /* Ombre avec couleur du thème */
}

.progress-ring-bg { 
    fill: none; 
    stroke: rgba(255, 255, 255, 0.1); /* Fond du cercle */
    stroke-width: 8; 
}

.progress-ring-fill {
    fill: none; 
    stroke: var(--primary-color); /* Couleur du thème */
    stroke-width: 8; 
    stroke-linecap: round;
    stroke-dasharray: 534.07;
    stroke-dashoffset: 534.07;
    transition: stroke-dashoffset 3s cubic-bezier(0.4, 0, 0.2, 1);
}

.counter-display { 
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    text-align: center; 
    z-index: 10; 
}

.counter-number { 
    font-size: clamp(2.5rem, 6vw, 3.5rem); 
    font-weight: 800; 
    color: var(--white); /* Texte blanc */
    margin-bottom: 0.5rem; 
    font-variant-numeric: tabular-nums; 
}

.counter-label { 
    font-size: clamp(1rem, 2.5vw, 1.25rem); 
    color: rgba(255, 255, 255, 0.7); /* Texte blanc transparent */
    font-weight: 600; 
    margin-bottom: 0.5rem; 
    text-transform: uppercase; 
}

.counter-goal { 
    font-size: 0.875rem; 
    color: rgba(255, 255, 255, 0.6); /* Texte blanc transparent */
    font-weight: 500; 
}

.community-impact {
    background: rgba(255, 255, 255, 0.05); /* Fond subtil */
    backdrop-filter: blur(10px); 
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem; 
    padding: 2.5rem 2rem; 
    text-align: center; 
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(30px); 
    opacity: 0; 
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.community-impact.show { 
    transform: translateY(0); 
    opacity: 1; 
}

.impact-text { 
    font-size: clamp(1.125rem, 3vw, 1.25rem); 
    color: rgba(255, 255, 255, 0.9); /* Texte blanc transparent */
    margin-bottom: 2rem; 
    line-height: 1.6; 
}

.highlight-number { 
    color: var(--primary-color); /* Couleur du thème */
    font-weight: 800; 
}

.cta-button {
    /* On utilise les classes .btn .btn-primary de votre thème */
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: var(--font-body);
    font-size: 1.125rem;
    background: var(--primary-color);
    color: white;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.cta-button:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 15px 35px rgba(0,0,0,0.4); 
    background: var(--primary-hover);
}

@media (max-width: 768px) {
    .love-impact-section { padding: 4rem 1rem; }
    .circular-progress-wrapper { width: 280px; height: 280px; }
    .community-impact { padding: 2rem 1.5rem; }
}

/* Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-on-scroll.animate {
    opacity: 1;
    transform: translateY(0);
}

/* NOUVEAU : Règle pour la dégradation gracieuse sans JavaScript */
.no-js .animate-on-scroll {
    opacity: 1;
    transform: translateY(0);
}

/* ================================================== */
/* == STYLES : PAGES D'ARCHIVE / CATÉGORIE == */
/* ================================================== */

/* NOUVEAU : Style du Hero de catégorie */
.category-hero {
    background-color: var(--text-dark); /* Fond sombre comme le footer */
    color: var(--white);
    padding-top: 140px; /* Espace pour le header sticky */
    padding-bottom: 5rem; /* Espace avant la forme */
    position: relative;
    text-align: center;
}

.category-hero .archive-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--white); /* Titre en blanc */
}

/* NOUVEAU : Style pour la forme arrondie */
.section-shape {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    line-height: 0;
    color: var(--bg-light); /* Doit être la couleur de la section suivante */
}

.section-shape svg {
    width: 100%;
    height: 80px; /* Hauteur de la courbe */
}

/* On retire l'ancien header d'archive */
.archive-header {
   display: none;
}

/* On ajuste le padding de la section suivante */
.category-top-apps {
    padding-top: 4rem; /* Espace après la courbe */
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    font-family: var(--font-heading);
}

.category-seo-content {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 4rem;
}
.category-seo-content .taxonomy-description { max-width: 800px; margin: 0 auto; }
.category-posts-list .archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.post-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.post-card-image-link {
    display: block;
    height: 200px;
}

.post-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-card-image {
    transform: scale(1.05);
}

.post-card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* NOUVEAU : Style pour les métadonnées (auteur, date) */
.post-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: 0.8rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
}

.post-card-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-card-author .avatar {
    border-radius: 50%;
}

.post-card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.post-card-title a {
    text-decoration: none;
    color: var(--text-dark);
}

.post-card-title a:hover {
    color: var(--primary-color);
}

.post-card-excerpt {
    color: var(--text-gray);
    font-size: 0.9rem;
    flex-grow: 1; /* Pousse le bouton vers le bas */
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* NOUVEAU : Style pour le bouton */
.btn-read-more {
    margin-top: auto; /* Se place en bas de la carte */
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    width: 100%;
    text-align: center;
    justify-content: center;
}

/* On retire l'ancien style de la date qui est maintenant dans .post-card-meta */
.post-card-date {
    /* Ce style est maintenant géré par .post-card-meta */
}

/* ================================================== */
/* == STYLES : SINGLE POST (ARTICLE UNIQUE) == */
/* ================================================== */

/* Style du Hero d'article (commun aux deux templates) */
.single-post-hero {
    background-color: var(--text-dark);
    color: var(--white);
    padding-top: 140px;
    padding-bottom: 5rem;
    position: relative;
}

.single-post-hero .entry-header-hero {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.single-post-hero .entry-category {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 1rem;
}

.single-post-hero .entry-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--white);
    margin-bottom: 1.5rem;
}

.single-post-hero .entry-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.single-post-hero .entry-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.single-post-hero .entry-author .avatar {
    border-radius: 50%;
}

.single-post-hero .entry-thumbnail-hero {
    max-width: 900px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.single-post-hero .entry-thumbnail-hero img {
    width: 100%;
    height: auto;
    display: block;
}

.single-post-hero .section-shape {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    line-height: 0;
    color: var(--bg-light);
}

.single-post-hero .section-shape svg {
    width: 100%;
    height: 80px;
}

/*
LA CORRECTION EST ICI :
On retire la grille et on centre le contenu de l'article.
Ces règles s'appliqueront à tous les articles (standard et avis).
*/
.main-article-content {
    max-width: 800px; /* Largeur de lecture confortable */
    margin: 0 auto 4rem; /* Centrage et espace en bas */
}

/* On s'assure que le bloc Top Apps est bien stylé */
.single-post .category-top-apps {
    padding-top: 4rem;
    margin-bottom: 3rem;
}

/* On cache la sidebar partout */
.sidebar-single {
    display: none;
}

/* Styles du contenu de l'article */
.main-article-content .entry-content {
    line-height: 1.8;
}

.main-article-content .entry-content h2,
.main-article-content .entry-content h3 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.main-article-content .entry-content p {
    margin-bottom: 1.5rem;
}

.main-article-content .entry-content a {
    color: var(--primary-color);
    text-decoration: underline;
}


/* ================================================== */
/* == STYLES DÉFINITIFS : TEMPLATE AVIS DÉTAILLÉ (Logo à cheval) == */
/* ================================================== */

/* Hero de l'avis (inchangé) */
.review-hero { background-color: var(--text-dark); color: var(--white); padding-top: 140px; padding-bottom: 6rem; position: relative; }
.review-header-text { text-align: center; max-width: 800px; margin: 0 auto; }
.review-header-text .entry-category { display: inline-block; background: rgba(255, 255, 255, 0.1); color: var(--white); padding: 0.25rem 0.75rem; border-radius: 50px; font-size: 0.8rem; font-weight: 600; text-decoration: none; margin-bottom: 1rem; }
.review-header-text .entry-title { font-size: clamp(2.5rem, 5vw, 4rem); color: var(--white); margin: 0; }
.review-hero .section-shape { position: absolute; bottom: 0; left: 0; width: 100%; line-height: 0; color: var(--bg-light); }
.review-hero .section-shape svg { width: 100%; height: 80px; }

/* Conteneur global qui remonte pour positionner le logo */
.review-intro-block {
    position: relative;
    z-index: 10;
    margin-bottom: 3rem;
    margin-top: -5rem; /* Cette ligne positionne le logo correctement */
}

/* Style du logo */
.review-logo {
    width: 120px;
    height: 120px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    margin: 0 auto; /* On retire la marge du bas pour un contrôle précis */
    border: 4px solid var(--white);
    overflow: hidden;
    
    /* ▼▼▼ CORRECTION Z-INDEX ▼▼▼ */
    position: relative; /* Nécessaire pour que z-index fonctionne */
    z-index: 2;         /* On s'assure que le logo est au-dessus */
}
.review-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mise en page du bloc verdict */
.review-summary-box {
    background: var(--white);
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    gap: 2.5rem;

    /* ▼▼▼ CORRECTION CLÉ : On fait remonter le bloc blanc SOUS le logo ▼▼▼ */
    margin-top: -80px; /* Valeur à ajuster si besoin (environ la moitié de la hauteur du logo) */
    padding-top: 80px; /* On ajoute du padding en haut pour que le contenu ne soit pas caché par le logo */
    position: relative; /* Nécessaire pour z-index */
    z-index: 1;         /* On s'assure que le bloc est en dessous du logo */
}

/* Section du haut (Verdict + Note) */
.summary-top-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: center;
}

/* (Le reste du CSS est identique et correct) */
.review-summary-title { font-size: 2.25rem; font-family: var(--font-heading); margin: 0 0 1rem 0; text-align: left; }
.review-summary-text { color: var(--text-gray); line-height: 1.7; text-align: left; }
.review-summary-text p { margin-bottom: 0; }
.summary-rating { text-align: center; }
.rating-score { font-size: 3rem; font-weight: 700; line-height: 1; }
.rating-score span { font-size: 1.5rem; color: var(--text-gray); }
.rating-stars { --percent: calc(var(--rating) / 5 * 100%); font-size: 1.5rem; color: #ccc; position: relative; }
.rating-stars::before { content: '★★★★★'; color: #f8ce0b; position: absolute; width: var(--percent); overflow: hidden; left: 0; top: 0; }
.summary-pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; padding-top: 2.5rem; border-top: 1px solid #eee; }
.summary-pros-cons h4 { font-size: 1.1rem; margin-bottom: 0.75rem; font-family: var(--font-heading); }
.summary-pros-cons ul { list-style: none; padding: 0; margin: 0; }
.summary-pros-cons ul li { display: flex; align-items: flex-start; gap: 0.5rem; margin-bottom: 0.5rem; }
.summary-pros-cons .icon { width: 16px; height: 16px; flex-shrink: 0; margin-top: 0.2rem; }
.pros .icon { color: #2ecc71; }
.cons .icon { color: #e74c3c; }
.summary-cta { padding-top: 1.5rem; border-top: 1px solid #eee; }
.summary-cta .btn {
    width: 100%;
    display: inline-flex; /* Ajout crucial pour garantir le comportement flexbox */
    justify-content: center;
}
.cta-price { text-align: center; font-size: 0.9rem; color: var(--text-gray); margin-top: 0.75rem; }

@media (max-width: 768px) {
    .summary-top-section { grid-template-columns: 1fr; gap: 2rem; }
    .review-summary-title, .review-summary-text { text-align: center; }
    .summary-pros-cons { grid-template-columns: 1fr; }
}

/* ================================================== */
/* == STYLES : BANDE DE RÉASSURANCE == */
/* ================================================== */

.reassurance-band {
    padding: 3rem 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.reassurance-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colonnes sur desktop */
    gap: 2rem;
    text-align: center;
}

.reassurance-item {
    position: relative;
}

.reassurance-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -1rem;
    transform: translateY(-50%);
    width: 1px;
    height: 60%;
    background-color: rgba(0, 0, 0, 0.1);
}

.reassurance-value {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

/* On applique la couleur principale au premier et dernier chiffre */
.reassurance-item:first-child .reassurance-value,
.reassurance-item:last-child .reassurance-value {
    color: var(--primary-color);
}

.reassurance-label-1 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.reassurance-label-2 {
    font-size: 0.9rem;
    color: var(--text-gray);
}

/* Responsive */
@media (max-width: 768px) {
    .reassurance-grid {
        grid-template-columns: 1fr; /* 1 colonne sur mobile */
        gap: 2rem;
    }
    .reassurance-item:not(:last-child)::after {
        display: none; /* On cache tous les séparateurs */
    }
}

/* ================================================== */
/* == STYLE UNIFIÉ : EN-TÊTE BLOC TOP APPS == */
/* ================================================== */

.top-apps-header {
    background-color: var(--accent-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 3rem;
}

.top-apps-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.top-apps-title .highlight {
    /* On peut utiliser un dégradé pour un effet plus sympa */
    background: linear-gradient(45deg, var(--primary-hover), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.top-apps-subtitle {
    font-size: 1.1rem;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

.top-apps-subtitle strong {
    color: var(--text-dark);
}

/* Note : J'ai gardé la classe .highlight ici pour la simplicité, même si elle est rouge */
.top-apps-subtitle .highlight {
    color: var(--primary-color);
}

.top-apps-reassurance {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-gray);
}

/* --- NOUVEAU : Section Processus de Test (Avec animation) --- */
.process-section {
    padding: 5rem 0;
    background: var(--white);
}

.process-timeline {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
}

/* La ligne de FOND (grise) */
.process-timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--accent-color);
    top: 0;
    bottom: 0;
    left: 34px;
    z-index: 0; /* CORRECTION : Derrière tout */
}

/* La ligne de PROGRESSION (colorée) qui va s'animer */
.process-timeline::before {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--primary-color);
    top: 0;
    left: 34px;
    z-index: 1; /* Au-dessus de la ligne de fond */
    height: var(--timeline-progress, 0); /* Hauteur contrôlée par JS */
    transition: height 0.1s linear; /* Animation fluide */
}

.process-step {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    position: relative;
    margin-bottom: 3rem;
    z-index: 2; /* <-- LA CORRECTION EST ICI */
}

.process-step:last-child {
    margin-bottom: 0;
}

.process-icon-wrapper {
    flex-shrink: 0;
    position: relative;
    z-index: 2; /* CORRECTION : Au-dessus de TOUTES les lignes */
}

.process-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: var(--transition);
}

.process-icon svg {
    width: 32px;
    height: 32px;
}

.process-step:hover .process-icon {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    transform: scale(1.1);
}

/* NOUVEAU : Style pour l'icône quand elle est "activée" par le scroll */
.process-step.is-active .process-icon {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.process-content h4 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.process-content p {
    color: var(--text-gray);
    margin: 0;
}

@media (max-width: 768px) {
    .process-timeline::after,
    .process-timeline::before {
        left: 24px;
    }
    .process-step {
        gap: 1.5rem;
    }
    .process-icon {
        width: 50px;
        height: 50px;
    }
    .process-icon svg {
        width: 24px;
        height: 24px;
    }
}

/* --- NOUVEAU : Style du Sommaire Dynamique --- */
.toc-container {
    background: var(--accent-color);
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
    position: relative;
}

.toc-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-dark);
}

.toc-toggle {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 50px;
    padding: 0.3rem 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.toc-toggle:hover {
    background: var(--primary-color);
    color: var(--white);
}

.toc-list {
    list-style: decimal;
    padding-left: 20px;
    margin-top: 1rem;
    
    /* Caché par défaut */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.toc-container.is-open .toc-list {
    max-height: 1000px; /* Assez grand pour contenir le sommaire */
    opacity: 1;
    visibility: visible;
}

.toc-list li {
    margin-bottom: 0.75rem;
}

.toc-list a {
    color: var(--text-gray);
    text-decoration: none;
    font-weight: 500;
}

.toc-list a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Style pour les sous-éléments (h3) */
.toc-list ul {
    list-style: disc; /* Affiche des puces rondes */
    margin-top: 0.75rem;
    padding-left: 20px;
}

/* --- NOUVEAU : Style du Bloc Auteur --- */
.author-box {
    display: flex;
    flex-direction: column; /* Stack sur mobile */
    align-items: center;
    text-align: center;
    gap: 1.5rem;
    background: var(--accent-color);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 3rem;
    margin-bottom: 4rem;
}

.author-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.author-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin: 0 0 0.25rem;
}

.author-role {
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 1rem;
}

.author-description {
    color: var(--text-gray);
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Disposition sur les écrans plus larges */
@media (min-width: 768px) {
    .author-box {
        flex-direction: row; /* Côte à côte sur desktop */
        text-align: left;
        gap: 2rem;
    }
    .author-avatar {
        flex-shrink: 0;
    }
}

/* --- FAQ Section --- */
.faq-section {
    padding: 6rem 0;
    background: var(--white); /* Fond clair pour contraster */
}

.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
    border-top: 1px solid #e5e5e5;
}

.faq-item {
    border-bottom: 1px solid #e5e5e5;
}

.faq-question {
    /* Reset du style de bouton */
    background: none;
    border: none;
    width: 100%;
    padding: 1.5rem 0;
    text-align: left;
    cursor: pointer;

    /* Layout */
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.faq-question span {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
}

.faq-icon {
    color: var(--primary-color);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    flex-shrink: 0; /* Empêche l'icône de rétrécir */
}

.faq-answer {
    /* La magie de l'accordéon */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.faq-answer p {
    padding-bottom: 1.5rem;
    color: var(--text-gray);
    line-height: 1.8;
}

/* Style de l'état "ouvert" */
.faq-item.active .faq-question span {
    color: var(--primary-color);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-item.active .faq-answer {
    /* Valeur assez grande pour contenir n'importe quelle réponse */
    max-height: 500px; 
}

/* ================================================== */
/* --- Style des Citations (Blockquotes) --- */
/* ================================================== */

.entry-content blockquote {
    margin: 2.5rem 0; /* Espace vertical avant et après la citation */
    padding: 2rem; /* Espace intérieur généreux */
    
    /* L'élément de design principal : la bordure gauche */
    border-left: 5px solid var(--primary-color);
    
}
    
/* ================================================== */
/* == UNIFICATION : BOUTONS BLOCS WORDPRESS (CORRIGÉ) == */
/* ================================================== */

/* 
  On cible les boutons WordPress UNIQUEMENT à l'intérieur du contenu d'un article 
  pour rendre la règle plus spécifique et donc prioritaire.
*/
.entry-content .wp-block-button__link {
    /* On copie les styles de base de la classe .btn */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                background-color 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: var(--font-body);
    
    /* On surcharge le style en ligne et les styles de base de WP */
    border-radius: 50px !important; 

    /* On copie les styles du bouton primaire .btn-primary */
    color: var(--white) !important; /* On force le texte en blanc */
    background: linear-gradient(45deg, var(--primary-hover), var(--primary-color)) !important; /* On FORCE le fond */
    background-size: 100% 100%;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

/* On ajoute les effets de survol et d'appui avec la même spécificité */
.entry-content .wp-block-button__link:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
    color: var(--white) !important;
    text-decoration: none; /* On s'assure qu'il ne se souligne pas au survol */
}

.entry-content .wp-block-button__link:active {
    transform: translateY(0) scale(1);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

/* On s'assure que le texte en gras à l'intérieur hérite du bon style */
.entry-content .wp-block-button__link strong {
    font-weight: inherit;
}

/* ================================================== */
/* == POPUP PROMOTIONNELLE == */
/* ================================================== */

.promo-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.promo-popup-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.promo-popup-modal {
    background: var(--primary-color);
    color: var(--white);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    text-align: center;
    max-width: 420px;
    width: 100%;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.promo-popup-overlay.is-visible .promo-popup-modal {
    transform: scale(1);
}

.promo-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.2);
    border: none;
    color: var(--white);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
}
.promo-popup-close:hover {
    background: rgba(0,0,0,0.4);
}

.promo-popup-icon {
    width: 80px;
    height: 80px;
    background: #0088cc; /* Bleu Telegram */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 136, 204, 0.4);
}
.promo-popup-icon svg {
    width: 40px;
    height: 40px;
}

.promo-popup-title {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 5vw, 2.25rem);
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--white);
}

.promo-popup-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.promo-popup-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: #0088cc; /* Bleu Telegram */
    color: var(--white);
    font-weight: 700;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.1rem;
    width: 100%;
    box-shadow: 0 5px 20px rgba(0, 136, 204, 0.5);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.promo-popup-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 136, 204, 0.6);
}

.promo-popup-features {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start; /* Aligne à gauche */
    text-align: left;
}
.promo-popup-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    opacity: 0.9;
}