/* ================================================================
   BERTRAND PRESTATIONS v4.1 — CSS blindé Elementor
   RÈGLE CRITIQUE : max-height sur .bpw-acc-body SANS !important
   car le JS doit pouvoir l'écraser via element.style
   ================================================================ */

/* ── Reset ciblé ─────────────────────────────────────────────── */
.bpw-wrap, .bpw-wrap * { box-sizing: border-box; }
.bpw-wrap a            { text-decoration: none !important; color: inherit !important; }
.bpw-wrap p            { margin: 0 !important; padding: 0 !important; }

/* ── Wrapper ─────────────────────────────────────────────────── */
.bpw-wrap {
    background-color: #15191E;
    padding: 40px;
    width: 100%;
    position: relative;
}

/* ── En-tête ─────────────────────────────────────────────────── */
.bpw-header { margin-bottom: 40px; }
.bpw-eyebrow {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 3px !important;
    text-transform: uppercase !important;
    color: #FD7F00 !important;
    margin-bottom: 12px !important;
    line-height: 1 !important;
}
.bpw-eyebrow::before {
    content: '' !important;
    display: inline-block !important;
    width: 24px !important;
    height: 2px !important;
    background: #FD7F00 !important;
    flex-shrink: 0 !important;
}
.bpw-main-title {
    font-size: clamp(20px, 3.2vw, 32px) !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    line-height: 1.1 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ── Éléments communs ────────────────────────────────────────── */
.bpw-badge {
    display: inline-block !important;
    font-size: 8px !important;
    font-weight: 700 !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    color: #FD7F00 !important;
    background: rgba(253,127,0,0.1) !important;
    border: 1px solid rgba(253,127,0,0.35) !important;
    border-radius: 3px !important;
    padding: 3px 8px !important;
    margin-bottom: 8px !important;
}
.bpw-num {
    display: block !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 2px !important;
    color: rgba(255,255,255,0.2) !important;
    margin-bottom: 8px !important;
    transition: color .25s ease !important;
    line-height: 1 !important;
}
.bpw-item-title {
    display: block !important;
    font-size: clamp(13px,1.8vw,15px) !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    text-transform: uppercase !important;
    letter-spacing: .8px !important;
    line-height: 1.25 !important;
    margin: 0 0 10px !important;
    padding: 0 !important;
    transition: color .25s ease !important;
}
.bpw-item-desc {
    font-size: clamp(11px,1.4vw,12px) !important;
    color: rgba(255,255,255,0.5) !important;
    line-height: 1.7 !important;
    margin: 0 !important;
    padding: 0 !important;
    transition: color .3s ease !important;
}
.bpw-cta {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: 16px !important;
    font-size: 9px !important;
    font-weight: 700 !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    color: #FD7F00 !important;
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity .3s ease, transform .3s ease !important;
}
.bpw-cta-link { display: inline-block !important; text-decoration: none !important; }
.bpw-cta-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 18px !important; height: 18px !important;
    border: 1px solid #FD7F00 !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
}
.bpw-cta-icon svg { stroke: #FD7F00 !important; width: 7px !important; height: 7px !important; }

/* Barre verticale gauche */
.bpw-vbar {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important; bottom: 0 !important;
    width: 3px !important;
    background: #FD7F00 !important;
    transform: scaleY(0) !important;
    transform-origin: top !important;
    transition: transform .35s cubic-bezier(.4,0,.2,1) !important;
    border-radius: 0 2px 2px 0 !important;
    z-index: 2 !important;
}
/* Barre horizontale bas */
.bpw-bar {
    position: absolute !important;
    bottom: 0 !important; left: 0 !important; right: 0 !important;
    height: 3px !important;
    background: #FD7F00 !important;
    transform: scaleX(0) !important;
    transform-origin: left !important;
    transition: transform .4s cubic-bezier(.4,0,.2,1) !important;
    z-index: 4 !important;
}

/* Images */
.bpw-img-bg, .bpw-card-bg {
    position: absolute !important;
    inset: 0 !important;
    background-color: #1c2128 !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    transition: transform .6s cubic-bezier(.4,0,.2,1), filter .4s ease !important;
}
.bpw-img-overlay, .bpw-card-overlay {
    position: absolute !important;
    inset: 0 !important;
    background: rgba(21,25,30,0.38) !important;
    z-index: 1 !important;
    pointer-events: none !important;
}
.bpw-zoom .bpw-item:hover .bpw-img-bg,
.bpw-zoom .bpw-item:hover .bpw-card-bg { transform: scale(1.06) !important; }

/* ================================================================
   LAYOUT 1 — ACCORDÉON
   ================================================================ */
.bpw-layout-accordion .bpw-sep-list {
    display: flex !important;
    flex-direction: column !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
}
.bpw-layout-accordion .bpw-sep-list .bpw-item {
    border-top: 1px solid rgba(255,255,255,0.1) !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    transition: border-top-color .3s ease !important;
    background: transparent !important;
    position: relative !important;
}
.bpw-layout-accordion .bpw-sep-list .bpw-item:hover,
.bpw-layout-accordion .bpw-sep-list .bpw-acc-open {
    border-top-color: rgba(253,127,0,0.45) !important;
}

/* ── BOUTON TRIGGER
   PAS de all:unset — on reset seulement ce qui est nécessaire
   et on garde pointer-events intact
   ─────────────────────────────────────────────────────────────── */
.bpw-acc-trigger {
    /* Reset styles Elementor/theme sur les buttons */
    appearance: none !important;
    -webkit-appearance: none !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    font-family: inherit !important;
    /* Notre style */
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    width: 100% !important;
    padding: 20px 20px 20px 22px !important;
    cursor: pointer !important;
    text-align: left !important;
    position: relative !important;
    transition: background .25s ease !important;
    /* Couleurs héritées, pas de override Elementor */
    color: inherit !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    font-weight: normal !important;
    font-size: inherit !important;
    line-height: inherit !important;
}
.bpw-acc-trigger:focus { outline: none !important; }
.bpw-acc-trigger:focus-visible { outline: 2px solid #FD7F00 !important; }

/* Barre orange DANS le trigger — ne chevauche pas le border-top de l'item */
.bpw-acc-trigger .bpw-vbar {
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
}
.bpw-acc-open .bpw-acc-trigger {
    background: rgba(253,127,0,0.06) !important;
}
.bpw-acc-open .bpw-acc-trigger .bpw-vbar {
    transform: scaleY(1) !important;
}

/* Numéro dans trigger */
.bpw-acc-num {
    flex-shrink: 0 !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 2px !important;
    color: rgba(255,255,255,0.25) !important;
    transition: color .25s ease !important;
    line-height: 1 !important;
    min-width: 24px !important;
    display: inline !important;
}
/* Titre dans trigger */
.bpw-acc-title {
    flex: 1 !important;
    font-size: clamp(13px,1.8vw,15px) !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    text-transform: uppercase !important;
    letter-spacing: .8px !important;
    line-height: 1.25 !important;
    transition: color .25s ease !important;
    margin: 0 !important;
    padding: 0 !important;
    display: inline !important;
    background: transparent !important;
}
.bpw-acc-open .bpw-acc-num   { color: #FD7F00 !important; }
.bpw-acc-open .bpw-acc-title { color: #FD7F00 !important; }

/* Chevron */
.bpw-acc-chevron {
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 30px !important; height: 30px !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    border-radius: 50% !important;
    background: transparent !important;
    transition: transform .35s ease, border-color .25s, background .25s !important;
    pointer-events: none !important;
}
.bpw-acc-chevron svg {
    stroke: rgba(255,255,255,0.4) !important;
    width: 10px !important; height: 10px !important;
    display: block !important;
    transition: stroke .25s !important;
    fill: none !important;
}
.bpw-acc-open .bpw-acc-chevron {
    transform: rotate(180deg) !important;
    border-color: #FD7F00 !important;
    background: rgba(253,127,0,0.1) !important;
}
.bpw-acc-open .bpw-acc-chevron svg { stroke: #FD7F00 !important; }

/* Corps accordéon
   CRITIQUE : max-height SANS !important pour que le JS puisse l'écraser
   La transition garde !important car elle n'est pas modifiée par JS */
.bpw-acc-body {
    max-height: 0;          /* PAS de !important — JS doit pouvoir modifier */
    overflow: hidden !important;
    transition: max-height .45s cubic-bezier(.4,0,.2,1) !important;
}
.bpw-acc-inner {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 24px !important;
    padding: 6px 24px 28px 24px !important;
    align-items: start !important;
}
.bpw-acc-img {
    height: 200px !important;
    border-radius: 8px !important;
    background-color: #1c2128 !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}
.bpw-acc-text { padding-top: 2px !important; }
.bpw-acc-text .bpw-item-desc { color: rgba(255,255,255,0.7) !important; }
.bpw-acc-text .bpw-cta,
.bpw-acc-text .bpw-cta-link .bpw-cta { opacity: 1 !important; transform: none !important; }

/* ================================================================
   LAYOUT 2 — LISTE ÉDITORIALE
   ================================================================ */
.bpw-layout-list .bpw-sep-list {
    display: flex !important;
    flex-direction: column !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
}
.bpw-layout-list .bpw-sep-list .bpw-item {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    border-top: 1px solid rgba(255,255,255,0.1) !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    overflow: hidden !important;
    cursor: pointer !important;
    transition: border-top-color .3s ease !important;
    text-decoration: none !important;
}
.bpw-layout-list .bpw-sep-list .bpw-item:hover {
    border-top-color: rgba(253,127,0,0.45) !important;
}
.bpw-item-left {
    position: relative !important;
    padding: 28px 28px 28px 22px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    transition: transform .4s cubic-bezier(.4,0,.2,1) !important;
    overflow: hidden !important;
}
.bpw-item-left .bpw-vbar { left: 0 !important; top: 0 !important; bottom: 0 !important; }
.bpw-layout-list .bpw-item:hover .bpw-item-left { transform: translateX(10px) !important; }
.bpw-layout-list .bpw-item:hover .bpw-item-left .bpw-vbar { transform: scaleY(1) !important; }
.bpw-layout-list .bpw-item:hover .bpw-num        { color: #FD7F00 !important; }
.bpw-layout-list .bpw-item:hover .bpw-item-title  { color: #FD7F00 !important; }
.bpw-layout-list .bpw-item:hover .bpw-item-desc   { color: rgba(255,255,255,0.8) !important; }
.bpw-layout-list .bpw-item:hover .bpw-cta         { opacity: 1 !important; transform: none !important; }
.bpw-flip { direction: rtl !important; }
.bpw-flip > * { direction: ltr !important; }
.bpw-flip .bpw-item-left { padding: 28px 22px 28px 28px !important; }
.bpw-flip .bpw-item-left .bpw-vbar { left: auto !important; right: 0 !important; border-radius: 2px 0 0 2px !important; }
.bpw-flip:hover .bpw-item-left { transform: translateX(-10px) !important; }
.bpw-img-wrap {
    position: relative !important;
    height: 200px !important;
    overflow: hidden !important;
    background: #1c2128 !important;
}

/* ================================================================
   LAYOUT 3 — GRILLE PHOTO
   ================================================================ */
.bpw-layout-grid .bpw-grid { display: grid !important; gap: 16px !important; }
.bpw-grid-3 { grid-template-columns: repeat(3,1fr) !important; }
.bpw-grid-2 { grid-template-columns: repeat(2,1fr) !important; }
.bpw-grid-item {
    position: relative !important;
    display: block !important;
    overflow: hidden !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    min-height: 220px !important;
    text-decoration: none !important;
}
.bpw-grid-item .bpw-img-bg { filter: brightness(.55) !important; }
.bpw-grid-item .bpw-img-overlay {
    background: linear-gradient(to top, rgba(21,25,30,0.92) 0%, rgba(21,25,30,0.12) 55%, transparent 100%) !important;
}
.bpw-zoom .bpw-grid-item:hover .bpw-img-bg { transform: scale(1.06) !important; filter: brightness(.4) !important; }
.bpw-grid-item:hover .bpw-bar { transform: scaleX(1) !important; }
.bpw-grid-content {
    position: relative !important;
    z-index: 2 !important;
    padding: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    min-height: 220px !important;
}
.bpw-grid-item .bpw-item-desc { max-height: 0 !important; overflow: hidden !important; opacity: 0 !important; transition: max-height .4s ease, opacity .3s ease !important; }
.bpw-grid-item:hover .bpw-item-desc { max-height: 80px !important; opacity: 1 !important; }
.bpw-grid-item:hover .bpw-cta { opacity: 1 !important; transform: none !important; }
.bpw-grid-item:hover .bpw-item-title { color: #FD7F00 !important; }

/* ================================================================
   LAYOUT 4 — CARDS SUPERPOSÉES
   ================================================================ */
.bpw-layout-cards .bpw-cards { display: grid !important; gap: 16px !important; }
.bpw-cards-3 { grid-template-columns: repeat(3,1fr) !important; }
.bpw-cards-2 { grid-template-columns: repeat(2,1fr) !important; }
.bpw-card { display: block !important; cursor: pointer !important; text-decoration: none !important; }
.bpw-card-wrap {
    position: relative !important;
    height: 280px !important;
    overflow: hidden !important;
    border-radius: 10px !important;
}
.bpw-card-bg { filter: brightness(.55) !important; }
.bpw-zoom .bpw-card:hover .bpw-card-bg { transform: scale(1.06) !important; filter: brightness(.35) !important; }
.bpw-card-overlay { background: linear-gradient(to top, rgba(21,25,30,0.96) 0%, rgba(21,25,30,0.15) 55%, transparent 100%) !important; }
.bpw-card:hover .bpw-bar { transform: scaleX(1) !important; }
.bpw-card-content {
    position: absolute !important;
    bottom: 0 !important; left: 0 !important; right: 0 !important;
    padding: 20px 18px 22px !important;
    z-index: 3 !important;
    transition: transform .35s cubic-bezier(.4,0,.2,1) !important;
}
.bpw-card:hover .bpw-card-content { transform: translateY(-6px) !important; }
.bpw-card-content .bpw-item-title { font-size: 13px !important; }
.bpw-card-content .bpw-item-desc { max-height: 0 !important; overflow: hidden !important; opacity: 0 !important; transition: max-height .4s ease, opacity .3s ease !important; }
.bpw-card:hover .bpw-card-content .bpw-item-desc { max-height: 60px !important; opacity: 1 !important; }
.bpw-card:hover .bpw-cta { opacity: 1 !important; transform: none !important; }
.bpw-card:hover .bpw-item-title { color: #FD7F00 !important; }

/* ================================================================
   LAYOUT 5 — TIMELINE
   ================================================================ */
.bpw-layout-timeline .bpw-timeline { display: flex !important; flex-direction: column !important; }
.bpw-tl-item {
    display: grid !important;
    grid-template-columns: 64px 1fr !important;
    text-decoration: none !important;
    cursor: pointer !important;
}
.bpw-tl-aside { display: flex !important; flex-direction: column !important; align-items: center !important; flex-shrink: 0 !important; padding-top: 6px !important; }
.bpw-tl-dot {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important; height: 40px !important;
    border-radius: 50% !important;
    background: #FD7F00 !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    color: #fff !important;
    letter-spacing: 1px !important;
    transition: transform .3s ease, box-shadow .3s ease !important;
    flex-shrink: 0 !important;
}
.bpw-tl-item:hover .bpw-tl-dot { transform: scale(1.12) !important; box-shadow: 0 0 0 6px rgba(253,127,0,0.2) !important; }
.bpw-tl-line { flex: 1 !important; width: 2px !important; background: rgba(255,255,255,0.1) !important; min-height: 20px !important; margin-top: 6px !important; transition: background .3s ease !important; }
.bpw-tl-item:hover .bpw-tl-line { background: rgba(253,127,0,0.35) !important; }
.bpw-tl-body { padding: 4px 0 36px 20px !important; transition: transform .3s ease !important; }
.bpw-tl-item:hover .bpw-tl-body { transform: translateX(4px) !important; }
.bpw-tl-item:hover .bpw-item-title { color: #FD7F00 !important; }
.bpw-tl-item:hover .bpw-item-desc  { color: rgba(255,255,255,0.8) !important; }
.bpw-tl-img {
    height: 180px !important;
    border-radius: 8px !important;
    background-color: #1c2128 !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    margin-top: 14px !important;
}
.bpw-tl-body .bpw-cta { opacity: 0 !important; transform: translateY(4px) !important; }
.bpw-tl-item:hover .bpw-tl-body .bpw-cta { opacity: 1 !important; transform: none !important; }

/* ================================================================
   RESPONSIVE — ≤ 900px
   ================================================================ */
@media (max-width: 900px) {
    .bpw-wrap { padding: 28px 20px !important; }
    .bpw-layout-list .bpw-sep-list .bpw-item { grid-template-columns: 1fr !important; direction: ltr !important; }
    .bpw-layout-list .bpw-sep-list .bpw-item .bpw-img-wrap { order: -1 !important; }
    .bpw-item-left { padding: 20px 16px 20px 20px !important; }
    .bpw-flip .bpw-item-left { padding: 20px 16px 20px 20px !important; }
    .bpw-flip .bpw-item-left .bpw-vbar { left: 0 !important; right: auto !important; border-radius: 0 2px 2px 0 !important; }
    .bpw-layout-list .bpw-item:hover .bpw-item-left { transform: none !important; }
    .bpw-grid-3 { grid-template-columns: repeat(2,1fr) !important; }
    .bpw-cards-3 { grid-template-columns: repeat(2,1fr) !important; }
    .bpw-acc-inner { grid-template-columns: 1fr !important; }
    .bpw-acc-img { height: 160px !important; }
    .bpw-tl-item { grid-template-columns: 52px 1fr !important; }
    .bpw-tl-dot { width: 36px !important; height: 36px !important; }
}

/* ================================================================
   RESPONSIVE — ≤ 640px
   ================================================================ */
@media (max-width: 640px) {
    .bpw-wrap { padding: 24px 14px !important; }
    .bpw-header { margin-bottom: 24px !important; }
    .bpw-main-title { font-size: 19px !important; }
    .bpw-img-wrap { height: 180px !important; }
    .bpw-grid-3, .bpw-grid-2 { grid-template-columns: 1fr !important; }
    .bpw-grid-item .bpw-item-desc { max-height: 60px !important; opacity: 1 !important; }
    .bpw-grid-item .bpw-cta { opacity: 1 !important; transform: none !important; }
    .bpw-cards-3, .bpw-cards-2 { grid-template-columns: 1fr !important; }
    .bpw-card-wrap { height: 220px !important; }
    .bpw-card-content .bpw-item-desc { max-height: 60px !important; opacity: 1 !important; }
    .bpw-card .bpw-cta { opacity: 1 !important; transform: none !important; }
    .bpw-acc-trigger { padding: 16px 14px 16px 18px !important; gap: 10px !important; }
    .bpw-acc-inner { padding: 6px 14px 22px 18px !important; gap: 14px !important; }
    .bpw-acc-chevron { width: 26px !important; height: 26px !important; }
    .bpw-acc-img { height: 140px !important; }
    .bpw-tl-item { grid-template-columns: 44px 1fr !important; }
    .bpw-tl-body { padding: 4px 0 24px 12px !important; }
    .bpw-tl-img { height: 140px !important; }
    .bpw-cta { opacity: 1 !important; transform: none !important; }
    .bpw-tl-body .bpw-cta { opacity: 1 !important; transform: none !important; }
}

/* ================================================================
   RESPONSIVE — ≤ 380px
   ================================================================ */
@media (max-width: 380px) {
    .bpw-wrap { padding: 18px 10px !important; }
    .bpw-main-title { font-size: 16px !important; }
    .bpw-item-title { font-size: 12px !important; }
    .bpw-acc-trigger { padding: 14px 10px 14px 14px !important; }
}
