/* FAQ CSS - Version Hébraïque/Arabe (RTL) */
/* assets/css/faq_heb.css */

/* CSS spécifique FAQ RTL - SIMPLE ET PROPRE */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 200px);
    direction: rtl;
}

/* CENTRER LE SOUS-TITRE COMME EN FRANÇAIS */
.faq-container p {
    text-align: center !important;
    direction: rtl;
}

/* CIBLER SPÉCIFIQUEMENT LE SOUS-TITRE */
.page-subtitle {
    text-align: center !important;
    direction: rtl;
}

.page-header {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: center; /* CENTRER tout le contenu */
    direction: rtl;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

.page-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 15px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    direction: rtl;
    text-align: center; /* CENTRER le titre aussi */
}

.page-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 0;
    direction: rtl;
    text-align: center !important; /* CENTRER le sous-titre comme en français */
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
    width: 100% !important;
}

.faq-container {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    direction: rtl;
}

.faq-category {
    margin-bottom: 40px;
    direction: rtl;
}

.category-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    direction: rtl !important;
    text-align: right !important;
    /* Icône à droite en RTL */
    justify-content: flex-end !important;
}

.category-title i {
    margin-left: 10px;
    margin-right: 0;
    order: 2; /* Icône après le texte */
}

/* FORCER tous les titres H1, H2, H3 à droite */
html[dir="rtl"] h1,
html[dir="rtl"] h2, 
html[dir="rtl"] h3,
.page-container h1,
.page-container h2,
.page-container h3 {
    text-align: right !important;
    direction: rtl !important;
}

.faq-item {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(99, 102, 241, 0.3); /* Contour plus foncé en bleu */
    border-radius: 15px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    direction: rtl;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.1); /* Ombre bleue */
}

.faq-item:hover {
    background: rgba(99, 102, 241, 0.15); /* Hover en bleu */
    border-color: rgba(99, 102, 241, 0.6); /* Contour encore plus foncé au hover */
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.2); /* Ombre plus forte */
}

.faq-question {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--text-primary);
    user-select: none;
    direction: rtl;
    text-align: right;
}

.faq-question span {
    flex: 1;
    text-align: right;
    padding-right: 0;
    padding-left: 15px;
}

.faq-question:hover {
    color: #6366f1; /* Bleu du header au lieu du jaune */
}

.faq-icon {
    transition: transform 0.3s ease;
    color: #6366f1; /* Flèche en bleu du header */
    font-size: 1.1rem;
    font-weight: 600;
    /* Icône à gauche en RTL */
    order: -1;
    margin-right: 0;
    margin-left: 0;
    flex-shrink: 0;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0, 0, 0, 0.1);
    direction: rtl;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer-content {
    padding: 20px;
    color: var(--text-secondary);
    line-height: 1.6;
    direction: rtl;
    text-align: right;
    font-family: 'Arial', 'Helvetica', sans-serif; /* Police compatible hébreu */
}

/* Responsive RTL */
@media (max-width: 768px) {
    .page-container {
        padding: 15px;
    }
    
    .page-header {
        padding: 20px;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .faq-container {
        padding: 20px;
    }
    
    .faq-question {
        padding: 15px;
    }
    
    .faq-answer-content {
        padding: 15px;
    }
}

/* CORRECTION SIMPLE POUR TITRES À DROITE */
.page-title,
.page-subtitle,
.category-title {
    text-align: right !important;
}

/* CORRECTION POUR ICÔNES EN RTL */
.category-title {
    display: flex !important;
    flex-direction: row-reverse !important; /* Inverser l'ordre : texte puis icône */
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 10px !important;
}

.category-title i {
    order: 2 !important; /* Icône en second */
}

/* CORRECTION POUR FLÈCHE FAQ EN RTL */
.faq-question {
    display: flex !important;
    flex-direction: row-reverse !important; /* Texte à droite, flèche à gauche */
    justify-content: space-between !important;
    align-items: center !important;
    text-align: right !important;
}

.faq-question span {
    flex: 1 !important;
    text-align: right !important;
    padding-left: 15px !important; /* Espace entre texte et flèche */
    padding-right: 0 !important;
}

.faq-icon {
    order: -1 !important; /* Flèche en premier (à gauche) */
    margin-left: 0 !important;
    margin-right: 0 !important;
    color: #6366f1 !important; /* Flèche en bleu aussi dans la section RTL */
}