/**
 * EF Smart FAQ - Styles
 */

/* Container principal */
.ef-smart-faq-container {
    max-width: 100%;
    margin: 0;
    padding: 60px 20px;
    /* Background défini dynamiquement en inline CSS avec la couleur de l'événement */
}

/* Header */
.ef-faq-header {
    text-align: left;
    margin-bottom: 30px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.ef-faq-title {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #000;
}

.ef-faq-subtitle {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Barre de recherche + Filtres sur la même ligne */
.ef-faq-search-wrapper {
    max-width: 1200px;
    margin: 0 auto 40px;
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

/* Renforcer les styles contre les overrides du thème */
.ef-smart-faq-container .ef-faq-search,
.ef-smart-faq-container input.ef-faq-search {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 100% !important;
    max-width: none !important;
    height: 56px !important;
    padding: 16px 26px 16px 54px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    border: 2px solid transparent !important;
    border-radius: 9999px !important;
    outline: none !important;
    background-color: rgba(255,255,255,0.75) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06) !important;
    line-height: normal !important;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%239AA7B3" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/></svg>') !important;
    background-repeat: no-repeat !important;
    background-position: 20px center !important;
    background-size: 18px 18px !important;
}

.ef-faq-search {
    flex: 1;
    min-width: 300px;
    height: 55px;
    padding: 16px 28px 16px 70px;
    font-size: 15px;
    border: none;
    border-radius: 20px;
    outline: none;
    transition: all 0.3s ease;
    background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="%23999999" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/></svg>') no-repeat 30px center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    line-height: normal;
}

.ef-faq-search:focus {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.ef-smart-faq-container .ef-faq-search:focus,
.ef-smart-faq-container input.ef-faq-search:focus {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1) !important;
    transform: translateY(-1px);
}

.ef-faq-search::placeholder {
    color: #93a1ad;
    font-size: 14px;
    font-weight: 500;
}

/* Filtres */
.ef-faq-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ef-faq-filter {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    background: #fff;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    white-space: nowrap;
}

.ef-faq-filter:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.ef-faq-filter.active {
    background-color: #8fd1e0;
    color: #000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Grille FAQ */
.ef-faq-grid {
    display: grid;
    gap: 15px;
    margin-bottom: 30px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.ef-faq-grid[data-columns="1"] {
    grid-template-columns: 1fr;
}

.ef-faq-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.ef-faq-grid[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

/* Item FAQ */
.ef-faq-item {
    background: #fff;
    border: none;
    border-radius: 10px;
    padding: 20px 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

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

.ef-faq-item.active {
    background-color: #8fd1e0;
}

.ef-faq-item.hidden {
    display: none;
}

/* Question */
.ef-faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
    color: #000;
    margin-bottom: 0;
    transition: color 0.3s ease;
}

.ef-faq-item.active .ef-faq-question {
    color: #000;
}

.ef-faq-icon {
    flex-shrink: 0;
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.ef-faq-item.active .ef-faq-icon {
    transform: rotate(180deg);
}

/* Réponse */
.ef-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, margin-top 0.4s ease;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
}

.ef-faq-item.active .ef-faq-answer {
    max-height: 500px;
    margin-top: 15px;
}

.ef-faq-answer p {
    margin: 0 0 10px 0;
}

.ef-faq-answer p:last-child {
    margin-bottom: 0;
}

/* Message aucun résultat */
.ef-faq-no-results {
    text-align: center;
    padding: 40px 20px;
    background: #f5f5f5;
    border-radius: 12px;
}

.ef-faq-no-results p {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #666;
}

.ef-faq-no-results a {
    color: #8fd1e0;
    text-decoration: none;
    font-weight: 600;
}

.ef-faq-no-results a:hover {
    text-decoration: underline;
}

/* Message aucun résultat */
.ef-faq-no-results {
    text-align: left;
    padding: 30px;
    background: transparent;
    border-radius: 10px;
    max-width: 1200px;
    margin: 20px auto 0;
}

.ef-faq-no-results .ef-no-result-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #333;
}

.ef-faq-no-results .ef-no-result-text {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.ef-faq-no-results a {
    color: #333;
    text-decoration: underline;
    font-weight: 600;
}

.ef-faq-no-results a:hover {
    color: #000;
}

/* Responsive */
@media (max-width: 768px) {
    .ef-smart-faq-container {
        padding: 40px 15px;
    }
    
    .ef-faq-header {
        text-align: center;
    }
    
    .ef-faq-grid[data-columns="2"],
    .ef-faq-grid[data-columns="3"] {
        grid-template-columns: 1fr;
    }
    
    .ef-faq-title {
        font-size: 28px;
    }
    
    .ef-faq-subtitle {
        font-size: 14px;
    }
    
    .ef-faq-search-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
    
    .ef-faq-search {
        font-size: 15px;
        height: 55px;
        padding: 16px 24px 16px 70px;
        min-width: 100%;
        border-radius: 20px;
        background-position: 30px center;
    }
    
    .ef-faq-filters {
        justify-content: center;
        width: 100%;
        gap: 10px;
    }
    
    .ef-faq-filter {
        font-size: 13px;
        padding: 10px 20px;
    }
    
    .ef-faq-item {
        padding: 16px 20px;
    }
    
    .ef-faq-question {
        font-size: 15px;
    }
    
    .ef-faq-answer {
        font-size: 14px;
    }
    
    .ef-faq-no-results {
        padding: 30px 15px;
    }
}

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

.ef-faq-item {
    animation: fadeInUp 0.5s ease-out;
}
