/* faq.css - Styles spécifiques pour la page FAQ */

/* Header de la page FAQ */
.page-header.faq-header {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/illu/hurlevent.jpg') center/cover no-repeat;
    height: 35vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    margin-top: 70px; /* Espace pour la navbar fixe */
}

.page-header-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 20px;
}

.page-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-family: 'Cinzel', serif;
    color: var(--primary-color);
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

.page-subtitle {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* Section de recherche */
.faq-search-section {
    background-color: rgba(10, 10, 24, 0.95);
    padding: 1rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 70px; /* Aligner avec la navbar */
    z-index: 90;
    transition: var(--transition);
}

.faq-search-section.fixed {
    position: fixed;
    left: 0;
    width: 100%;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.search-container {
    position: relative;
    max-width: 400px; /* Réduit la largeur de la barre de recherche */
    margin: 0 auto;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-size: 1.1rem;
}

#faq-search {
    width: 100%;
    padding: 10px 12px 10px 35px; /* Dimensions réduites */
    border-radius: var(--border-radius);
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(239, 203, 62, 0.3);
    color: var(--text-light);
    font-size: 0.95rem; /* Taille de police réduite */
    transition: var(--transition);
}

#faq-search:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(239, 203, 62, 0.3);
}

#faq-search::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem; /* Taille de police du placeholder réduite */
}

/* Catégories FAQ */
.faq-categories {
    margin: 2rem 0;
}

.category-tab:hover,
.category-tab.active {
    background-color: var(--primary-light);
    color: var(--text-dark);
}

.category-tab.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Contenu FAQ */
.faq-content {
    margin-bottom: 3rem;
    min-height: 300px; /* Garantir un espace minimum pour l'indicateur de chargement */
}

.faq-category {
    display: none;
}

.faq-category.active,
.faq-category.visible {
    display: block;
}

/* Style amélioré des cartes de questions */
.faq-item {
    background-color: rgba(10, 10, 24, 0.5);
    border-radius: var(--border-radius);
    margin-bottom: 1.2rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    border-left: 3px solid var(--primary-color);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.faq-item:hover {
    transform: translateX(5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.faq-item.important {
    border-left-color: #e67e22; /* Couleur différente pour les questions importantes */
    background-color: rgba(10, 10, 24, 0.7); /* Fond légèrement plus foncé pour les questions importantes */
}

.faq-item.important::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 30px 30px 0;
    border-color: transparent #e67e22 transparent transparent;
    z-index: 2;
}

.faq-question {
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background-color: rgba(5, 5, 15, 0.5);
    transition: var(--transition);
    border-bottom: 1px solid rgba(239, 203, 62, 0.1);
}

.faq-question:hover {
    background-color: rgba(5, 5, 15, 0.7);
}

.faq-question h3 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--primary-color);
    padding-right: 2rem; /* Espace pour l'icône */
    flex: 1;
    line-height: 1.4;
}

.toggle-icon {
    font-size: 1rem;
    color: var(--primary-color);
    transition: var(--transition);
    flex-shrink: 0;
    margin-top: 0.25rem;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(239, 203, 62, 0.1);
    border-radius: 50%;
}

.faq-item.open .toggle-icon {
    background-color: rgba(239, 203, 62, 0.3);
}

/* Résoudre le problème des textes trop longs dans la réponse */
.faq-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    background-color: rgba(5, 5, 15, 0.3);
    line-height: 1.7;
}

.faq-item.open .faq-answer {
    padding: 1.5rem;
    max-height: none !important; /* Force l'affichage complet du contenu */
    overflow: visible; /* Permet au contenu de déborder si nécessaire */
}

.faq-item.open .toggle-icon i {
    transform: rotate(45deg);
}

.faq-answer p {
    margin-top: 0;
    margin-bottom: 1rem;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

/* Amélioration des listes dans les réponses */
.faq-answer ul, 
.faq-answer ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.faq-answer ul li {
    margin-bottom: 0.7rem;
    position: relative;
    padding-left: 0.5rem;
}

.faq-answer ol li {
    margin-bottom: 0.7rem;
}

.faq-answer ul li::before {
    content: '•';
    color: var(--primary-color);
    position: absolute;
    left: -1em;
    font-weight: bold;
}

.faq-answer a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: var(--transition);
}

.faq-answer a:hover {
    color: var(--primary-light);
    text-decoration: none;
}

/* Mise en évidence des éléments importants */
.faq-answer strong {
    color: var(--primary-light);
    font-weight: 700;
}

/* Style des blocs de code */
.faq-answer code {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.9rem;
    color: #f8f8f2;
    border: 1px solid rgba(239, 203, 62, 0.2);
}

/* Message "Aucun résultat" */
.no-results-message {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
    display: none;
    border-left: 3px solid #e74c3c;
}

/* Mise en surbrillance des termes de recherche */
.highlight {
    background-color: rgba(239, 203, 62, 0.3);
    color: var(--primary-color);
    padding: 0 3px;
    border-radius: 3px;
    font-weight: 600;
}

/* Section contact */
.question-contact-section {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/illu/champs.jpg') center/cover no-repeat;
    padding: 4rem 0;
    text-align: center;
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
}

.contact-text h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-family: 'Cinzel', serif;
}

.contact-text p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.contact-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

/* États de chargement et erreurs */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

.loading-indicator i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    background-color: rgba(180, 30, 30, 0.2);
    border-radius: var(--border-radius);
    margin: 2rem 0;
}

.error-message i {
    font-size: 2rem;
    color: #e74c3c;
    margin-bottom: 1rem;
}

.empty-faq-message {
    padding: 2rem;
    text-align: center;
    font-style: italic;
    color: rgba(255, 255, 255, 0.7);
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius);
}

/* Animation d'apparition des éléments */
.faq-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.faq-item.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Styles */
@media screen and (max-width: 992px) {
    .page-title {
        font-size: 2.5rem;
    }
    
    .page-subtitle {
        font-size: 1.2rem;
    }
    
    .faq-question h3 {
        font-size: 1.1rem;
    }
}

@media screen and (max-width: 768px) {
    .page-header.faq-header {
        height: 30vh;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .category-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .category-tab {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
    
    .faq-question {
        padding: 1rem;
    }
    
    .faq-answer {
        padding: 1rem;
    }
    
    .contact-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-buttons .cta-button {
        width: 100%;
        max-width: 300px;
    }
}

@media screen and (max-width: 576px) {
    .page-header.faq-header {
        height: 25vh;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .faq-question {
        padding: 1rem;
    }
    
    .faq-question h3 {
        font-size: 1rem;
    }
    
    .search-container {
        width: 90%;
        max-width: 300px;
    }
    
    .highlight {
        padding: 0 2px;
    }
}
tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem; /* Réduit l'espace entre les onglets */
    margin-bottom: 2rem;
}

.category-tab {
    padding: 0.7rem 1.3rem; /* Dimensions réduites */
    background-color: rgba(0, 0, 0, 0.3);
    color: var(--text-light);
    border: 1px solid var(--primary-light);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    font-family: 'Cinzel', serif;
    transition: var(--transition);
    position: relative;
    font-size: 0.95rem; /* Taille de police légèrement réduite */
}

.category-tab::after {
    content: attr(data-count);
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: var(--primary-color);
    color: var(--text-dark);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    opacity: 0;
    transform: scale(0);
    transition: var(--transition);
}

.category-tab.has-results::after {
    opacity: 1;
    transform: scale(1);
}

.category-tab:hover,
.category-tab.active {
    background-color: var(--primary-light);
    color: var(--text-dark);
}

.category-tab.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Contenu FAQ */
.faq-content {
    margin-bottom: 3rem;
    min-height: 300px; /* Garantir un espace minimum pour l'indicateur de chargement */
}

.faq-category {
    display: none;
}

.faq-category.active,
.faq-category.visible {
    display: block;
}

.faq-item {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    border-left: 3px solid var(--primary-color);
    position: relative;
}

.faq-item:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.faq-item.important {
    border-left-color: #e67e22; /* Couleur différente pour les questions importantes */
}

.faq-item.important::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 30px 30px 0;
    border-color: transparent #e67e22 transparent transparent;
    z-index: 2;
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background-color: rgba(10, 10, 24, 0.8);
    transition: var(--transition);
}

.faq-question:hover {
    background-color: rgba(10, 10, 24, 0.9);
}

.faq-question h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--primary-color);
    padding-right: 2rem; /* Espace pour l'icône */
    flex: 1;
}

.toggle-icon {
    font-size: 1rem;
    color: var(--primary-color);
    transition: var(--transition);
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.faq-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    background-color: rgba(0, 0, 0, 0.2);
    line-height: 1.7;
}

.faq-item.open .faq-answer {
    padding: 1.5rem;
}

.faq-item.open .toggle-icon i {
    transform: rotate(45deg);
}

.faq-answer p {
    margin-top: 0;
    margin-bottom: 1rem;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-answer ul, 
.faq-answer ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.faq-answer li {
    margin-bottom: 0.5rem;
}

.faq-answer a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: var(--transition);
}

.faq-answer a:hover {
    color: var(--primary-light);
}

/* Message "Aucun résultat" */
.no-results-message {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
    display: none;
    border-left: 3px solid #e74c3c;
}

/* Mise en surbrillance des termes de recherche */
.highlight {
    background-color: rgba(239, 203, 62, 0.3);
    color: var(--primary-color);
    padding: 0 3px;
    border-radius: 3px;
    font-weight: 600;
}

/* Section contact */
.question-contact-section {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/illu/champs.jpg') center/cover no-repeat;
    padding: 4rem 0;
    text-align: center;
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
}

.contact-text h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-family: 'Cinzel', serif;
}

.contact-text p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.contact-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

/* États de chargement et erreurs */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

.loading-indicator i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    background-color: rgba(180, 30, 30, 0.2);
    border-radius: var(--border-radius);
    margin: 2rem 0;
}

.error-message i {
    font-size: 2rem;
    color: #e74c3c;
    margin-bottom: 1rem;
}

.empty-faq-message {
    padding: 2rem;
    text-align: center;
    font-style: italic;
    color: rgba(255, 255, 255, 0.7);
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius);
}

/* Animation d'apparition des éléments */
.faq-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.faq-item.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Styles animés des réponses */
.faq-answer strong {
    color: var(--primary-light);
}

.faq-answer ul li::before {
    content: '•';
    color: var(--primary-color);
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* Responsive Styles */
@media screen and (max-width: 992px) {
    .page-title {
        font-size: 2.5rem;
    }
    
    .page-subtitle {
        font-size: 1.2rem;
    }
    
    .faq-question h3 {
        font-size: 1.1rem;
    }
}

@media screen and (max-width: 768px) {
    .page-header.faq-header {
        height: 30vh;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .category-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .category-tab {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
    
    .faq-question {
        padding: 1rem;
    }
    
    .faq-answer {
        padding: 1rem;
    }
    
    .contact-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-buttons .cta-button {
        width: 100%;
        max-width: 300px;
    }
}

@media screen and (max-width: 576px) {
    .page-header.faq-header {
        height: 25vh;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .faq-question {
        padding: 1rem;
    }
    
    .faq-question h3 {
        font-size: 1rem;
    }
    
    .search-container {
        width: 90%;
    }
    
    .highlight {
        padding: 0 2px;
    }
}