/*
 Theme Name:   EJP Construction
 Theme URI:    https://ejp-construction.fr
 Description:  Thème enfant d'Astra pour EJP Construction
 Author:       Roofline
 Template:     astra
 Version:      1.0.2
 Text Domain:  ejp-construction
*/

html, body {
    overflow-x: hidden !important;
}

.titre-orange {
    color: #ED5503 !important;
}



/* Aligner le texte des bouton dans le hero home page */

.container-lien-projet .elementor-button-text {
    text-align: start !important;
}

.icon-hero img {
    min-width: 25px !important;
    
}

@media ( max-width: 768px) {
    .icon-hero img {
    min-width: 15px !important;
}
}



/* ==========================================================================
   FAQ accordéon (.ejp-faq)
   Desktop : 2 colonnes / Tablette + mobile : 1 colonne + bouton "Afficher plus"
   HTML dans un widget HTML Elementor, JS dans custom.js
   ========================================================================== */

@font-face {
    font-family: 'EJP DIN Condensed';
    src: url('fonts/DINCondensed-Regular.woff2') format('woff2'),
         url('fonts/DINCondensed-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'EJP DIN Condensed';
    src: url('fonts/DINCondensed-Bold.woff2') format('woff2'),
         url('fonts/DINCondensed-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

.ejp-faq {
    --ejp-faq-accent: #ED5503;
    --ejp-faq-text: #1D1D1B;
    --ejp-faq-answer: #555555;
    --ejp-faq-curve: 14px;
    width: 100%;
}

.ejp-faq__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 60px;
    align-items: start;
}

.ejp-faq__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ejp-faq__item {
    position: relative;
    margin: 0;
    padding: 0;
}

/* Trait orange avec la courbe à droite */
.ejp-faq__item::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--ejp-faq-curve);
    border-bottom: 1px solid var(--ejp-faq-accent);
    border-right: 1px solid var(--ejp-faq-accent);
    border-bottom-right-radius: var(--ejp-faq-curve);
    pointer-events: none;
}

.ejp-faq__question {
    all: unset;
    box-sizing: border-box;
    display: block;
    width: 100%;
    padding: 24px calc(var(--ejp-faq-curve) + 10px) 18px 0;
    font-family: 'EJP DIN Condensed', 'DIN Condensed', 'Arial Narrow', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.3;
    color: var(--ejp-faq-text);
    cursor: pointer;
    transition: color .2s ease;
}

.ejp-faq__question:hover,
.ejp-faq__item.is-open .ejp-faq__question {
    color: var(--ejp-faq-accent);
}

.ejp-faq__question:focus-visible {
    outline: 2px solid var(--ejp-faq-accent);
    outline-offset: 2px;
}

/* Ouverture animée sans calcul de hauteur en JS */
.ejp-faq__answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .3s ease;
}

.ejp-faq__item.is-open .ejp-faq__answer {
    grid-template-rows: 1fr;
}

.ejp-faq__answer-inner {
    overflow: hidden;
}

.ejp-faq__answer-inner > :first-child {
    margin-top: 0;
}

.ejp-faq__answer-inner > :last-child {
    margin-bottom: 0;
    padding-bottom: 24px;
}

.ejp-faq__answer-inner p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--ejp-faq-answer);
    padding-right: calc(var(--ejp-faq-curve) + 10px);
}

/* Bouton "Afficher plus" : masqué sur desktop */
.ejp-faq__more-wrap {
    display: none;
    justify-content: center;
    margin-top: 32px;
}

.ejp-faq__more {
    all: unset;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    border: 1px solid var(--ejp-faq-accent);
    border-radius: 0 0 var(--ejp-faq-curve) 0;
    font-family: 'EJP DIN Condensed', 'DIN Condensed', 'Arial Narrow', sans-serif;
    font-size: 17px;
    letter-spacing: .02em;
    color: var(--ejp-faq-accent);
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}

.ejp-faq__more:hover,
.ejp-faq__more:focus-visible {
    background-color: var(--ejp-faq-accent);
    color: #fff;
}

.ejp-faq__more-icon {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform .2s ease;
}

.ejp-faq.is-expanded .ejp-faq__more-icon {
    transform: translateY(2px) rotate(-135deg);
}

/* Tablette + mobile (breakpoint tablette Elementor) */
@media (max-width: 1024px) {
    .ejp-faq__grid {
        grid-template-columns: 1fr;
    }

    .ejp-faq__col--secondary {
        display: none;
    }

    .ejp-faq.is-expanded .ejp-faq__col--secondary {
        display: block;
        animation: ejpFaqFadeIn .3s ease;
    }

    .ejp-faq__more-wrap {
        display: flex;
    }
}

@media (max-width: 767px) {
    .ejp-faq__question {
        font-size: 17px;
        padding-top: 20px;
        padding-bottom: 16px;
    }
}

@keyframes ejpFaqFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .ejp-faq__answer,
    .ejp-faq.is-expanded .ejp-faq__col--secondary {
        transition: none;
        animation: none;
    }
}