/* ====================================================================

    SECTION 1 : INTRODUCTION ET STATISTIQUES

    Styles pour la section d'introduction

   ==================================================================== */

.intro-faq {
    text-align: center;
    padding: 2rem 0;
}

.section-title-small {
    margin-bottom: 3rem;
}

.section-padding {
    padding: 2rem 0;
}

/* ====================================================================
    SECTION 10 : COMPTEUR FAQ - Style pour le bloc statistiques
   ==================================================================== */

/* Bloc principal des statistiques FAQ */
.faq-counter {
    margin-top: 2rem;
    padding: 1.2rem;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--white) 100%);
    border: 2px solid var(--primary);
    border-radius: 10px;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Effet de survol */
.faq-counter:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-dark);
}

/* Animation d'entrée */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-counter {
    animation: fadeInUp 0.6s ease-out;
}

/* Ligne décorative supérieure */
.faq-counter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 10px 10px 0 0;
}

/* Texte principal */
.faq-counter p:first-of-type {
    margin: 0 0 2rem 0;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Icône ampoule */
.faq-counter .fa-lightbulb {
    color: var(--accent);
    font-size: 1.3rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Chiffre des questions */
.faq-counter .faq-count {
    color: var(--primary);
    font-size: 1.3em;
    font-weight: 800;
    margin: 0 5px;
    background: var(--white);
    padding: 2px 10px;
    border-radius: 20px;
    border: 1px solid var(--primary-light);
    display: inline-block;
    min-width: 40px;
    text-align: center;
}

/* Sous-titre */
.faq-counter p:nth-of-type(2) {
    margin: 0.5rem 0 0 0;
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.4;
    max-width: 300px;
}

/* Indicateur de scroll (optionnel) */
.faq-scroll-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.8rem;
    opacity: 0.7;
    animation: bounce 2s infinite;
}

.faq-scroll-hint i {
    color: var(--accent);
    margin-right: 5px;
    font-size: 0.8rem;
}

/* Animation de rebond pour l'indicateur */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

/* ====================================================================
   RESPONSIVE : Adaptation mobile
   ==================================================================== */

@media (max-width: 768px) {
    .faq-counter {
        padding: 1rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .faq-counter p:first-of-type {
        font-size: 1rem;
        flex-direction: column;
        gap: 8px;
    }
    
    .faq-counter .faq-count {
        font-size: 1.4em;
        padding: 3px 12px;
    }
    
    .faq-counter p:nth-of-type(2) {
        font-size: 0.85rem;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .faq-counter {
        border-width: 1px;
        padding: 0.8rem;
    }
    
    .faq-counter p:first-of-type {
        font-size: 0.95rem;
    }
    
    .faq-counter .fa-lightbulb {
        font-size: 1.1rem;
    }
}


/* ====================================================================

    SECTION 2 : NAVIGATION PAR CATÉGORIES

    Tags cliquables pour filtrer les FAQ

   ==================================================================== */

.faq-category-nav {
    margin-bottom: 3rem;
    padding: 1.5rem;
    background-color: var(--bg-light);
    border-radius: 12px;
    border-left: 5px solid var(--primary);
}

.faq-category-nav h3 {
    color: var(--primary-dark);
    margin-bottom: 2.3rem;
    font-size: 1.5rem;
    text-align: center;
}

/* Conteneur en grille */
.category-tags-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colonnes par défaut */
    gap: 15px;
    margin-top: 1.5rem;
}

.category-tag {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 20px;
    background-color: var(--white);
    border: 2px solid var(--border-light);
    border-radius: 12px; /* Changé de 30px à 12px pour mieux s'adapter à la grille */
    /* color: var(--primary-dark); */
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    min-height: 60px; /* Hauteur minimale pour uniformité */
}

/* Effet hover amélioré */
.category-tag:hover {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.category-tag i {
    font-size: 0.9rem;
    color: var(--primary);
}

.tag-count {
    background-color: var(--accent);
    color: var(--white);
    font-size: 0.85rem;
    padding: 4px 10px;
    border-radius: 20px;
    margin-left: 8px;
    font-weight: 700;
    min-width: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 992px) {
    .category-tags-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 colonnes sur tablette */
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .category-tags-grid {
        grid-template-columns: 1fr; /* 1 colonne sur mobile */
        gap: 10px;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .faq-category-nav {
        padding: 1.5rem 1rem;
    }
    
    .category-tag {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
}

/* Option : Style pour un nombre pair de catégories */
.category-tag:only-child {
    grid-column: 1 / -1;
    max-width: 300px;
    margin: 0 auto;
}

/* Option : Animation d'apparition */
.category-tag {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.category-tag:nth-child(1) { animation-delay: 0.1s; }
.category-tag:nth-child(2) { animation-delay: 0.2s; }
.category-tag:nth-child(3) { animation-delay: 0.3s; }
.category-tag:nth-child(4) { animation-delay: 0.4s; }
.category-tag:nth-child(5) { animation-delay: 0.5s; }
.category-tag:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ====================================================================

    SECTION 3 : SECTIONS DE CATÉGORIES

    Groupement visuel des FAQ par thème

   ==================================================================== */

.faq-category-section {
    margin-bottom: 4rem;
    padding: 2rem;
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-top: 5px solid var(--primary);
}

.category-title {
    color: var(--primary-dark);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-title i {
    color: var(--accent);
    font-size: 1.5rem;
}

.category-description {
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 2rem;
    padding-left: 1.5rem;
    border-left: 3px solid var(--primary-light);
    font-size: 0.95rem;
}

/* ====================================================================

    SECTION 4 : ACCORDÉON FAQ

    Système interactif d'ouverture/fermeture

   ==================================================================== */

.faq-accordion {
    border-radius: 8px;
    overflow: hidden;
}

.faq-item {
    margin-bottom: 1px;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.faq-question {
    width: 100%;
    padding: 1.5rem 2rem;
    background-color: var(--bg-light);
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
    border-radius: 8px;
}

.faq-question:hover {
    background-color: #e8f5e9;
}

.faq-question:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
}

.faq-question[aria-expanded="true"] {
    background-color: var(--primary);
    color: var(--white);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.question-text {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.question-text i {
    color: var(--primary);
    font-size: 1rem;
}

.faq-question[aria-expanded="true"] .question-text i {
    color: var(--white);
}

.faq-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: 20px;
}

.expand-icon, .collapse-icon {
    font-size: 1.2rem;
    transition: opacity 0.3s ease;
}

.expand-icon {
    opacity: 1;
    color: var(--primary);
}

.collapse-icon {
    opacity: 0;
    color: var(--white);
}

.faq-question[aria-expanded="true"] .expand-icon {
    opacity: 0;
}

.faq-question[aria-expanded="true"] .collapse-icon {
    opacity: 1;
}

/* ====================================================================

    SECTION 5 : RÉPONSES FAQ

    Styles pour le contenu des réponses avec animation
    
   ==================================================================== */

.faq-answer {
    background-color: var(--white);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.3s ease;
    border-left: 3px solid transparent;
}

.faq-question[aria-expanded="true"] + .faq-answer {
    border-left-color: var(--primary);
}

.answer-content {
    padding: 2rem;
    line-height: 1.7;
    color: var(--text-dark);
}

.answer-content strong {
    color: var(--primary-dark);
}

.answer-content ul, .answer-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.answer-content li {
    margin-bottom: 0.5rem;
}


/* ====================================================================

    SECTION 6 : ACTIONS FAQ

    Boutons d'interaction (utile, partager)

    ==================================================================== */

.faq-actions {
    padding: 1rem 2rem;
    border-top: 1px solid var(--border-light);
    background-color: #f9f9f9;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-faq-action {
    padding: 8px 16px;
    background-color: transparent;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    color: var(--text-light);
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-faq-action:hover {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    border-color: var(--primary);
}

.btn-faq-action i {
    font-size: 0.9rem;
}

/* ====================================================================

    SECTION 7 : APPEL À L'ACTION

    Section de contact encourageant l'interaction

   ==================================================================== */

.cta-faq {
    padding: 3rem;
    background: linear-gradient(135deg, var(--primary-light) 0%, #e8f5e9 100%);
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.cta-faq::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background-color: var(--primary);
    opacity: 0.1;
    border-radius: 50%;
}

.cta-faq::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 100px;
    height: 100px;
    background-color: var(--accent);
    opacity: 0.1;
    border-radius: 50%;
}

.cta-faq .section-title {
    position: relative;
    z-index: 1;
}

.cta-faq .lead-text {
    position: relative;
    z-index: 1;
    color: var(--text-dark);
}

.cta-buttons {
    position: relative;
    z-index: 1;
    margin-top: 2rem;
}

.cta-buttons .btn {
    min-width: 200px;
    transition: transform 0.3s ease;
}

.cta-buttons .btn:hover {
    transform: translateY(-3px);
}


.contact-response-time {    
    font-size: 0.9rem;
    color: var(--text-light);       
    margin-top: 3rem; 
}

/* ====================================================================

    SECTION 8 : RESPONSIVE DESIGN

    Adaptations pour tablettes et mobiles

   ==================================================================== */

@media (max-width: 992px) {
    .faq-category-nav {
        padding: 1rem;
    }
    
    .category-tags {
        gap: 8px;
    }
    
    .category-tag {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .faq-question {
        padding: 1.2rem 1.5rem;
        font-size: 1rem;
    }
    
    .answer-content {
        padding: 1.5rem;
    }
    
    .faq-actions {
        padding: 1rem 1.5rem;
    }
    
    .cta-faq {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .faq-category-section {
        padding: 1.5rem;
        margin-bottom: 2.5rem;
    }
    
    .category-title {
        font-size: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .faq-question {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .faq-toggle {
        margin-left: 0;
        align-self: flex-end;
    }
    
    .question-text {
        width: 100%;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .intro-faq {
        padding: 1rem 0;
    }
    
    .faq-stats {
        padding: 0.8rem 1.5rem;
    }
    
    .faq-item {
        margin-bottom: 0.5rem;
    }
    
    .faq-actions {
        flex-direction: column;
    }
    
    .btn-faq-action {
        width: 100%;
        justify-content: center;
    }
}

/* ====================================================================

    SECTION 9 : ANIMATIONS ET ÉTATS

    Micro-interactions pour une UX améliorée

   ==================================================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-category-section {
    animation: fadeIn 0.5s ease forwards;
}

.faq-item {
    animation: fadeIn 0.3s ease forwards;
}

/* Indicateur visuel pour FAQ ouverte */
.faq-item[data-opened="true"] {
    box-shadow: 0 0 0 2px var(--primary-light);
}

/* Style pour les liens dans les réponses */
.answer-content a {
    color: var(--primary);
    text-decoration: underline;
    font-weight: 600;
}

.answer-content a:hover {
    color: var(--primary-dark);
}

/* Style pour les citations ou exemples */
.answer-content blockquote {
    border-left: 4px solid var(--accent);
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
    color: var(--text-light);
}