/* ========================================
   BLOC FAQ
   ======================================== */

.blocfaq {
    padding: 10px 0;
    background-color: #FFFFFF;
}

/* ========================================
   HEADER - Titre et sous-titre
   ======================================== */

.blocfaq__header {
    text-align: center;
    margin-bottom: 40px;
}

.blocfaq__title {
    font-family: 'Momo Trust Display', sans-serif;
    font-weight: 400;
    font-size: 40px;
    color: #5CBE95;
}

.blocfaq__subtitle {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 600;
    font-style: italic;
    font-size: 25px;
    line-height: 33px;
    letter-spacing: 2.5px;
    color: #00283F;
    margin: 0;
}

/* ========================================
   CONTENT - Layout à deux colonnes
   ======================================== */

.blocfaq__content {
    display: flex;
    gap: 25px;
    align-items: flex-start;
    max-width: 1090px;
    margin: 0 auto;
}

/* ========================================
   FILTERS - Navigation par public
   ======================================== */

.blocfaq__filters {
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 216px;
    flex-shrink: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.blocfaq__filters--hidden {
    opacity: 0;
    visibility: hidden;
    width: 0;
    overflow: hidden;
}

.blocfaq__filter {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 10px 17px;
    min-height: 50px;
    border: 1px solid #5CBE95;
    border-radius: 8px;
    background-color: transparent;
    color: #00283F;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: normal;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.blocfaq__filter:hover {
    background-color: rgba(92, 190, 149, 0.1);
}

.blocfaq__filter--active {
    background-color: #5CBE95;
    color: #FFFFFF;
}

/* ========================================
   LIST - Conteneur des accordéons
   ======================================== */

.blocfaq__list {
    flex: 1;
    min-width: 0;
}

.blocfaq__group {
    display: none;
}

.blocfaq__group--active {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.blocfaq__group--search-mode {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Masquer les messages vides pendant la recherche */
.blocfaq__group--search-mode .blocfaq__empty {
    display: none;
}

/* ========================================
   ITEM - Accordéon FAQ
   ======================================== */

.blocfaq__item {
    background-color: rgba(0, 127, 180, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.blocfaq__item:hover {
    background-color: rgba(0, 127, 180, 0.15);
}

/* Question - Bouton déclencheur */
.blocfaq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: padding 0.3s ease;
}

.blocfaq__question:hover {
    padding: 12px 20px;
}

.blocfaq__question-text {
    flex: 1;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 600;
    font-style: italic;
    font-size: 19px;
    line-height: 21px;
    letter-spacing: 1.9px;
    color: #00253E;
    padding-right: 20px;
}

.blocfaq__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    position: relative;
}

.blocfaq__icon-plus,
.blocfaq__icon-minus {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.blocfaq__icon-plus {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.blocfaq__icon-minus {
    opacity: 0;
    transform: scale(0.8) rotate(-90deg);
}

/* Animation de l'icône quand l'accordéon est ouvert */
.blocfaq__question[aria-expanded="true"] .blocfaq__icon-plus {
    opacity: 0;
    transform: scale(0.8) rotate(90deg);
}

.blocfaq__question[aria-expanded="true"] .blocfaq__icon-minus {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* Réponse - Contenu */
.blocfaq__answer {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.1s,
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.1s,
                padding 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.blocfaq__answer[aria-hidden="false"] {
    max-height: 1000px;
    opacity: 1;
    transform: translateY(0);
    padding: 0 20px 20px;
}

.blocfaq__answer-content {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.6;
    color: #00253E;
}

.blocfaq__answer-content p {
    margin: 0 0 15px 0;
}

.blocfaq__answer-content p:last-child {
    margin-bottom: 0;
}

.blocfaq__answer-content ul,
.blocfaq__answer-content ol {
    margin: 0 0 15px 20px;
    padding: 0;
}

.blocfaq__answer-content li {
    margin-bottom: 8px;
}

/* ========================================
   EMPTY STATE - Message si section vide
   ======================================== */

.blocfaq__empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.blocfaq__empty p {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 400;
    font-style: italic;
    font-size: 16px;
    line-height: 1.5;
    color: #00253E;
    opacity: 0.6;
    margin: 0;
}

.blocfaq__empty--global {
    padding: 60px 20px;
    max-width: 600px;
    margin: 0 auto;
}

.blocfaq__empty--global p {
    font-size: 18px;
}

/* ========================================
   CTA - Bouton en bas
   ======================================== */

.blocfaq__cta {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

/* ========================================
   BARRE DE RECHERCHE
   ======================================== */

.blocfaq__search-container {
    background-color: #FFFFFF;
    padding: 20px 0;
    position: relative;
    z-index: 10;
}

.blocfaq__search-wrapper {
    display: flex;
    gap: 15px;
    align-items: center;
    background-color: #FFFFFF;
    padding: 20px;
    border-radius: 25px;
    @media (max-width: 991px){
        margin-top: -50px;
    }
    @media (min-width: 992px){
        margin-top: -110px;
    }
}

.blocfaq__search-input-wrapper {
    flex: 1; /* */
    min-width: 0;
    position: relative;
}

.blocfaq__search-input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid #00283F;
    border-radius: 8px;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-style: italic;
    font-weight: 400;
    font-size: 15px;
    line-height: 18px;
    color: #00283F;
    background-color: transparent;
    outline: none;
    transition: border-color 0.3s ease;
}

.blocfaq__search-input::placeholder {
    color: rgba(0, 40, 63, 0.75);
    font-style: italic;
}

.blocfaq__search-input:focus {
    border-color: #5CBE95;
}

.blocfaq__search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.blocfaq__search-clear:hover {
    background-color: rgba(0, 40, 63, 0.1);
}

.blocfaq__search-clear svg {
    display: block;
    width: 100%;
    height: 100%;
}

.blocfaq__search-clear--visible {
    display: flex;
}

.blocfaq__search-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blocfaq__search-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* Items cachés par la recherche */
.blocfaq__item.blocfaq__item--hidden {
    display: none;
}

/* Message des résultats de recherche */
.blocfaq__search-results {
    padding: 20px;
    text-align: center;
    background-color: rgba(92, 190, 149, 0.1);
    border-radius: 8px;
    margin-bottom: 20px;
}

.blocfaq__search-results p {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.5;
    color: #00283F;
    margin: 0;
}

.blocfaq__search-results strong {
    color: #5CBE95;
    font-weight: 700;
}

/* Message quand aucun résultat */
.blocfaq__no-results {
    padding: 40px 20px;
    text-align: center;
}

.blocfaq__no-results p {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 400;
    font-style: italic;
    font-size: 16px;
    line-height: 1.5;
    color: #00253E;
    opacity: 0.6;
    margin: 0;
}

.blocfaq__no-results strong {
    color: #00283F;
    font-weight: 700;
    opacity: 1;
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* Tablettes */
@media (max-width: 991px) {
    .blocfaq__title {
        font-size: 32px;
        line-height: 40px;
    }

    .blocfaq__subtitle {
        font-size: 20px;
        line-height: 28px;
        letter-spacing: 2px;
    }

    .blocfaq__content {
        flex-direction: column;
        gap: 30px;
    }

    .blocfaq__filters {
        width: 100%;
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }

    .blocfaq__list {
        width: 100%;
    }

    .blocfaq__filters--hidden {
        width: 0;
    }

    .blocfaq__filter {
        flex: 1;
        min-width: 200px;
        max-width: 250px;
    }

    .blocfaq__search-wrapper {
        padding: 15px;
    }

    .blocfaq__search-input {
        font-size: 14px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .blocfaq {
        padding: 30px 0;
    }

    .blocfaq__header {
        margin-bottom: 30px;
    }

    .blocfaq__title {
        font-size: 28px;
        line-height: 36px;
    }

    .blocfaq__subtitle {
        font-size: 16px;
        line-height: 22px;
        letter-spacing: 1.6px;
    }

    .blocfaq__filters {
        flex-direction: column;
        gap: 15px;
    }

    .blocfaq__filter {
        width: 100%;
        max-width: 100%;
        font-size: 14px;
        padding: 12px 10px 14px;
    }

    .blocfaq__question-text {
        font-size: 16px;
        line-height: 19px;
        letter-spacing: 1.6px;
    }

    .blocfaq__icon {
        width: 36px;
        height: 36px;
    }

    .blocfaq__answer-content {
        font-size: 14px;
    }

    .blocfaq__cta {
        margin-top: 30px;
    }

    .blocfaq__empty--global {
        padding: 40px 20px;
    }

    .blocfaq__empty--global p {
        font-size: 16px;
    }

    .blocfaq__search-container {
        padding: 15px 0;
    }

    .blocfaq__search-wrapper {
        gap: 10px;
        padding: 15px;
        border-radius: 20px;
    }

    .blocfaq__search-input {
        font-size: 14px;
        padding: 8px 35px 8px 12px;
    }

    .blocfaq__search-clear {
        right: 8px;
        width: 20px;
        height: 20px;
    }

    .blocfaq__search-clear svg {
        width: 16px;
        height: 16px;
    }

    .blocfaq__search-icon {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 480px) {
    .blocfaq__title {
        font-size: 24px;
        line-height: 32px;
    }

    .blocfaq__subtitle {
        font-size: 14px;
        line-height: 20px;
        letter-spacing: 1.4px;
    }

    .blocfaq__question-text {
        font-size: 15px;
        line-height: 18px;
        letter-spacing: 1.5px;
    }
}
