/* ==========================================================
   360 TECH — rendu public du constructeur de pages
   Conteneurs (sections, colonnes, rangées) et éléments.
   Les espacements arrivent en variables CSS posées en ligne
   (--pt/--pb/--pl/--pr, --mt/--mb, --gap, --w, --minw, --cw).
   ========================================================== */

/* ── Conteneurs ─────────────────────────────────────────── */
.bx {
    position: relative;
    padding: var(--pt, 0) var(--pr, 0) var(--pb, 0) var(--pl, 0);
    margin-top: var(--mt, 0);
    margin-bottom: var(--mb, 0);
    min-width: 0;
}
.bx-section { width: 100%; }
.bx-section.bx-boxed { padding-left: 0; padding-right: 0; }
.bx-section.bx-boxed > .bx-inner {
    max-width: var(--cw, 1280px);
    margin: 0 auto;
    padding-left: calc(2.5rem + var(--pl, 0px));
    padding-right: calc(2.5rem + var(--pr, 0px));
}
.bx-inner {
    position: relative;
    z-index: 1;
    display: flex;
    gap: var(--gap, 20px);
    min-width: 0;
}
.bx-col > .bx-inner { flex-direction: column; }
.bx-row > .bx-inner { flex-direction: row; align-items: stretch; }
.bx-row.bx-wrap > .bx-inner { flex-wrap: wrap; }
/* Un bloc dynamique occupe toute la largeur sans espace parasite */
.bx-section > .bx-inner > .bw-block { width: 100%; }

/* Colonnes d'une ligne : largeur libre (part égale) ou imposée (--w) */
.bx-row > .bx-inner > .bx { flex: 1 1 0; }
.bx-row > .bx-inner > .bx[style*="--w"] { flex: 0 1 var(--w); }
.bx-row.bx-wrap > .bx-inner > .bx { min-width: min(var(--minw, 0px), 100%); }
.bx-row > .bx-inner > .bw { flex: 0 1 auto; }

/* Fond : calque de couleur par-dessus l'image */
.bx-overlay { position: absolute; inset: 0; z-index: 0; border-radius: inherit; pointer-events: none; }

/* Visibilité par appareil */
@media (min-width: 769px) { .bx-hide-d { display: none !important; } }
@media (max-width: 768px) {
    .bx-hide-m { display: none !important; }
    .bx { padding-top: calc(var(--pt, 0px) * .6); padding-bottom: calc(var(--pb, 0px) * .6); }
    .bx-section.bx-boxed > .bx-inner { padding-left: 1.25rem; padding-right: 1.25rem; }
    .bx-row.bx-stack > .bx-inner { flex-direction: column; }
    .bx-row.bx-stack.bx-rev > .bx-inner { flex-direction: column-reverse; }
    .bx-row.bx-stack > .bx-inner > .bx,
    .bx-row.bx-stack > .bx-inner > .bw { flex: 1 1 auto; width: 100%; }
}

/* ── Éléments ───────────────────────────────────────────── */
.bw { min-width: 0; }
.bw-fs { font-size: var(--fs); }
@media (max-width: 768px) { .bw-fs { font-size: calc(var(--fs) * .8); } }

.bw-heading-text { color: inherit; }
.bw-heading h1.bw-heading-text:not(.bw-fs) { font-size: clamp(2.2rem, 5vw, 3.5rem); }
.bw-heading h2.bw-heading-text:not(.bw-fs) { font-size: clamp(1.75rem, 4vw, 2.6rem); }
.bw-heading h3.bw-heading-text:not(.bw-fs) { font-size: clamp(1.3rem, 2.6vw, 1.75rem); }
.bw-heading h4.bw-heading-text:not(.bw-fs) { font-size: 1.25rem; }
.bw-heading-text span { color: var(--primary-green); }

.bw-text-inner { font-size: 1.05rem; line-height: 1.8; color: inherit; }
.bw-text-inner > * + * { margin-top: .9em; }
.bw-text-inner ul, .bw-text-inner ol { padding-left: 1.4em; }
.bw-text-inner ul { list-style: disc; }
.bw-text-inner ol { list-style: decimal; }
.bw-text-inner a { color: var(--gold-text); text-decoration: underline; }
.bw-text-inner blockquote { border-left: 4px solid var(--primary-green); padding: .4em 0 .4em 1.1em; font-style: italic; }
.bw-text-inner h2, .bw-text-inner h3, .bw-text-inner h4 { margin-top: 1.2em; }
.bw-text-inner img { border-radius: 12px; }

.bw-image figure { margin: 0; }
.bw-image img { width: 100%; height: auto; }
.bw-image img.bw-shadow { box-shadow: var(--shadow-lg); }
.bw-image figcaption { margin-top: .6rem; font-size: .88rem; color: var(--text-light); text-align: center; }
.bw-image-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
    min-height: 180px; border: 2px dashed #d6d3c7; border-radius: 14px; color: #a8a29e; background: #fafaf7; font-size: .9rem;
}
.bw-image-empty i { font-size: 2rem; }

.bw-buttons { display: inline-flex; flex-wrap: wrap; gap: .9rem; align-items: center; }
.bw-button[style*="text-align:center"] .bw-buttons { justify-content: center; }
.bw-button { width: 100%; }

/* Boîte icône : variante « carte » = carte « Pourquoi 360 TECH » (style.css .why-card) */
.bw-iconbox { height: 100%; }
.bw-ib.why-card { height: 100%; }
.bw-ib-img { width: 68px; height: 68px; object-fit: cover; border-radius: 20px; margin: 0 auto 1.5rem; }
.bw-ib-plain .why-icon, .bw-ib-plain .bw-ib-img { margin-bottom: 1rem; }
.bw-ib-plain h3, .bw-ib-left h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.bw-ib-plain p, .bw-ib-left p { color: var(--text-light); line-height: 1.7; }
.bw-ib-left { display: flex; gap: 1.1rem; align-items: flex-start; text-align: left; }
.bw-ib-left .why-icon, .bw-ib-left .bw-ib-img { margin: 0; flex-shrink: 0; width: 56px; height: 56px; font-size: 1.4rem; border-radius: 16px; }
.bw-ib .btn-text-link { margin-top: .9rem; }
.bw[style*="text-align:left"] .bw-ib .why-icon, .bw[style*="text-align:left"] .bw-ib .bw-ib-img { margin-left: 0; }
.bw[style*="text-align:right"] .bw-ib .why-icon, .bw[style*="text-align:right"] .bw-ib .bw-ib-img { margin-right: 0; }

.bw-st.section-header { margin-bottom: 3rem; }
.bw-sectiontitle .section-header h2 { color: inherit; }

.bw-list { display: flex; flex-direction: column; gap: .7rem; }
.bw-list li { display: flex; gap: .7rem; align-items: flex-start; line-height: 1.6; }
.bw-list li i { color: var(--primary-green); margin-top: .3em; flex-shrink: 0; }

.bw-map iframe { border-radius: 16px; }

.bw-counter-num { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: clamp(2.2rem, 4vw, 3rem); color: var(--gold-text); line-height: 1.1; }
.bw-counter-lbl { color: var(--text-light); font-weight: 600; margin-top: .3rem; }

/* ── Styles repris de l'ancienne page d'accueil ─────────── */
.yt-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.yt-gallery-item { display: flex; flex-direction: column; }
.yt-embed-wrap { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 14px; box-shadow: 0 8px 30px rgba(0,0,0,0.12); }
.yt-embed-wrap iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.yt-video-title { margin: .75rem 0 0; font-weight: 600; font-size: .92rem; color: var(--text-main); text-align: center; }
.yt-channel-btn {
    display: inline-flex; align-items: center; gap: .6rem; background: #FF0000; color: #fff; font-weight: 700; font-size: 1rem;
    padding: .85rem 2rem; border-radius: 50px; box-shadow: 0 4px 20px rgba(255,0,0,0.35); transition: transform .2s, box-shadow .2s;
}
.yt-channel-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(255,0,0,0.45); color: #fff; }

/* En-tête de page générique */
.bb-page-header {
    padding: 160px 0 80px; text-align: center; color: #fff;
    background: linear-gradient(135deg, var(--ink) 0%, var(--ink) 60%, var(--ink-2) 100%);
}
.bb-page-header h1 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.5rem); }
.bb-page-header p { color: rgba(255,255,255,.75); font-size: 1.15rem; max-width: 720px; margin: 1rem auto 0; }
.bb-page-header .section-tag { margin-bottom: 1rem; }
@media (max-width: 768px) { .bb-page-header { padding: 130px 0 60px; } }

/* FAQ (accordéon) */
.bb-faq-list { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: .8rem; }
.bb-faq-item { background: #fff; border: 1px solid #ece7d8; border-radius: 14px; padding: 0 1.4rem; }
.bb-faq-item summary {
    list-style: none; cursor: pointer; padding: 1.15rem 0; font-weight: 700; color: var(--navy);
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.bb-faq-item summary::-webkit-details-marker { display: none; }
.bb-faq-item summary i { color: var(--dark-green); transition: transform .2s; }
.bb-faq-item[open] summary i { transform: rotate(180deg); }
.bb-faq-answer { padding: 0 0 1.2rem; color: var(--text-light); line-height: 1.75; }
