/* =============================================================================
   BONOBOT — CAPTATION PROSPECT
   Charte v1.0 (cream / noir profond / or sourd, Inter)
   Préfixes : .bbc-host (wrapper modes), .bb-* (UI app)
   ============================================================================= */

/* --- 1. Variables locales (non polluent les variables WP/theme) --- */
.bbc-host {
	--bbc-noir:   #0D0D0C;
	--bbc-cream:  #EDE7DC;
	--bbc-or:     #A88D5C;
	--bbc-blanc:  #FFFFFF;
	--bbc-gris:   #2A2826;
	--bbc-terra:  #B85A3C;
	--bbc-font:   'Inter', 'Helvetica Neue', system-ui, -apple-system, sans-serif;

	box-sizing: border-box;
	font-family: var(--bbc-font);
	color: var(--bbc-noir);
}
.bbc-host *,
.bbc-host *::before,
.bbc-host *::after {
	box-sizing: border-box;
}

/* --- 2. Modes (popup, page, inline) --- */
.bbc-mode-inline {
	max-width: 680px;
	margin: 0 auto;
	width: 100%;
}
/* Quand inline est utilisé dans une popup Elementor (ou autre builder) :
   on garantit que le wrapper ne crée pas de marge top/bottom parasite
   et qu'il s'adapte à la largeur du container Elementor. */
.elementor-popup-modal .bbc-mode-inline,
.elementor-widget-shortcode .bbc-mode-inline {
	margin: 0;
	max-width: 100%;
}

/* DANS une popup Elementor : on FORCE le comportement inline quel que soit
   le mode demande (popup, page, inline). Sinon mode="popup" creerait un
   overlay fixed par-dessus la popup Elementor (double overlay = contenu
   ecrase et invisible). C'est Elementor qui porte l'overlay et le bouton X,
   notre job c'est juste d'afficher la web-app comme contenu normal. */
.elementor-popup-modal .bbc-host.bbc-mode-popup,
.elementor-popup-modal .bbc-host.bbc-mode-page {
	position: static !important;
	inset: auto !important;
	background: transparent !important;
	padding: 0 !important;
	z-index: auto !important;
	display: block !important;
	overflow: visible !important;
	max-width: 100% !important;
	margin: 0 !important;
}
.elementor-popup-modal .bbc-host .bb-app {
	max-width: 100% !important;
	width: 100% !important;
	margin: 0 !important;
	max-height: 85vh !important;
	overflow-y: auto !important;
	border: 0 !important;
}

/* Compactage SPECIFIQUE pour popup Elementor :
   on reduit padding, font-size, et on passe les grilles a 2/3 colonnes max
   pour eviter que les cartes debordent en largeur et que le contenu ne
   depasse la hauteur disponible. */
.elementor-popup-modal .bb-hd {
	padding: 16px 22px;
}
.elementor-popup-modal .bb-body {
	padding: 22px 22px 8px;
	min-height: 0;
}
.elementor-popup-modal .bb-actions {
	padding: 16px 22px 18px;
}
.elementor-popup-modal .bb-title {
	font-size: 26px;
	margin-bottom: 6px;
}
.elementor-popup-modal .bb-sub {
	font-size: 14px;
	margin-bottom: 18px;
}
.elementor-popup-modal .bb-grid-3 {
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
}
.elementor-popup-modal .bb-grid-5 {
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
}
.elementor-popup-modal .bb-card {
	padding: 14px 12px;
}
.elementor-popup-modal .bb-card-lab {
	font-size: 13.5px;
}
.elementor-popup-modal .bb-card-sub {
	font-size: 11.5px;
}
.elementor-popup-modal .bb-volv {
	font-size: 30px;
}
.elementor-popup-modal .bb-logo {
	width: 130px;
	height: 26px;
}
.bbc-mode-page {
	max-width: 760px;
	margin: 3rem auto;
	padding: 0 1rem;
}
.bbc-mode-popup {
	position: fixed;
	inset: 0;
	z-index: 99990;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(13, 13, 12, 0.6);
	padding: 1rem;
	overflow-y: auto;
}
.bbc-mode-popup .bb-app {
	max-width: 680px;
	width: 100%;
	max-height: 92vh;
	overflow-y: auto;
}

/* --- 3. App container --- */
.bb-app {
	background: var(--bbc-cream);
	color: var(--bbc-noir);
	border: 1px solid var(--bbc-noir);
	font-weight: 300;
	line-height: 1.5;
}

/* --- 4. Header noir dramatique --- */
.bb-hd {
	background: var(--bbc-noir);
	color: var(--bbc-cream);
	padding: 22px 32px;
}
.bb-hd-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
}
.bb-logo {
	display: inline-flex;
	width: 160px;
	height: 32px;
	color: var(--bbc-cream);
}
.bb-logo svg { width: 100%; height: 100%; }

.bb-step {
	font-size: 11px;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--bbc-or);
	font-weight: 500;
}

/* --- 5. Progress bar --- */
.bb-pgrid {
	display: flex;
	gap: 4px;
	margin-top: 18px;
}
.bb-pd {
	flex: 1;
	height: 3px;
	background: rgba(237, 231, 220, 0.18);
	transition: background .4s ease, box-shadow .4s ease;
}
.bb-pd.done { background: var(--bbc-cream); }
.bb-pd.cur {
	background: var(--bbc-or);
	animation: bbPdPulse 1.6s ease-out infinite;
}
@keyframes bbPdPulse {
	0%   { box-shadow: 0 0 0 0 rgba(168, 141, 92, 0.55); }
	70%  { box-shadow: 0 0 0 4px rgba(168, 141, 92, 0); }
	100% { box-shadow: 0 0 0 0 rgba(168, 141, 92, 0); }
}

/* --- 6. Body --- */
.bb-body {
	padding: 36px 32px 12px;
	min-height: 360px;
}
.bb-title,
.bbc-host .bb-app h1.bb-title,
.bbc-host .bb-app .bb-title {
	font-size: 38px;
	font-weight: 300;
	letter-spacing: -0.022em;
	line-height: 1.06;
	margin: 0 0 12px;
	color: #0D0D0C !important; /* Force la couleur car certains themes Hello Elementor / shop forcent h1 en cream ou blanc */
	text-shadow: none;
	background: transparent;
	-webkit-text-fill-color: #0D0D0C; /* Safari/Webkit retro-compat */
}
.bb-sub {
	font-size: 15px;
	color: rgba(13, 13, 12, 0.72);
	margin: 0 0 26px;
	font-weight: 400;
}
.bb-sub .or { color: var(--bbc-or); font-weight: 500; }

/* --- 7. Grilles cartes --- */
.bb-grid { display: grid; gap: 12px; }
.bb-grid-3 { grid-template-columns: repeat(3, 1fr); }
.bb-grid-5 { grid-template-columns: repeat(5, 1fr); }
.bb-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

/* --- 8. Cartes (besoin / secteur / mode) --- */
.bb-card {
	background: var(--bbc-blanc);
	border: 1.5px solid var(--bbc-noir);
	padding: 18px 16px;
	text-align: left;
	cursor: pointer;
	transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
	display: flex;
	flex-direction: column;
	gap: 8px;
	position: relative;
	font-family: inherit;
	color: var(--bbc-noir);
	animation: bbIn .4s ease-out backwards;
}
.bb-grid > :nth-child(2)  { animation-delay: .04s; }
.bb-grid > :nth-child(3)  { animation-delay: .08s; }
.bb-grid > :nth-child(4)  { animation-delay: .12s; }
.bb-grid > :nth-child(5)  { animation-delay: .16s; }
.bb-grid > :nth-child(6)  { animation-delay: .20s; }
.bb-grid > :nth-child(7)  { animation-delay: .24s; }
.bb-grid > :nth-child(8)  { animation-delay: .28s; }
.bb-grid > :nth-child(9)  { animation-delay: .32s; }
.bb-grid > :nth-child(10) { animation-delay: .36s; }
@keyframes bbIn {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: none; }
}
.bb-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 0 -3px var(--bbc-noir);
}
.bb-card:focus-visible {
	outline: 2px solid var(--bbc-or);
	outline-offset: 2px;
}
.bb-card.sel {
	background: var(--bbc-noir);
	color: var(--bbc-cream);
	transform: translateY(-2px);
}
.bb-card.sel .bb-card-sub { color: rgba(237, 231, 220, 0.7); }
.bb-card.sel::after {
	content: '\2713';
	position: absolute;
	top: 8px;
	right: 10px;
	color: var(--bbc-or);
	font-weight: 500;
	font-size: 14px;
	animation: bbCheck .25s ease-out;
}
@keyframes bbCheck {
	from { transform: scale(0); opacity: 0; }
	to   { transform: scale(1); opacity: 1; }
}
.bb-card-i {
	width: 30px;
	height: 30px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: inherit;
}
.bb-card-i svg { width: 100%; height: 100%; display: block; }
.bb-card-lab {
	font-size: 15px;
	font-weight: 500;
	letter-spacing: -0.005em;
	line-height: 1.2;
}
.bb-card-sub {
	font-size: 12px;
	color: rgba(13, 13, 12, 0.62);
	font-weight: 400;
	line-height: 1.4;
}
.bb-card-sm {
	padding: 14px 10px;
	gap: 6px;
	align-items: center;
	text-align: center;
}
.bb-card-sm .bb-card-i { width: 22px; height: 22px; }
.bb-card-sm .bb-card-lab { font-size: 12.5px; font-weight: 500; }

/* --- 9. Champs formulaire --- */
.bb-field { margin-bottom: 16px; }
.bb-lab {
	display: block;
	font-size: 11px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: rgba(13, 13, 12, 0.6);
	margin-bottom: 6px;
	font-weight: 500;
}
.bb-in {
	width: 100%;
	border: 0;
	border-bottom: 1.5px solid var(--bbc-noir);
	padding: 10px 0;
	font-family: inherit;
	font-size: 15px;
	font-weight: 400;
	background: transparent;
	color: inherit;
	border-radius: 0;
	transition: border-color .2s ease;
}
.bb-in:focus { outline: none; border-bottom-color: var(--bbc-or); }
.bb-ta {
	width: 100%;
	border: 1.5px solid var(--bbc-noir);
	padding: 10px 12px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 400;
	background: var(--bbc-blanc);
	color: inherit;
	resize: none;
	border-radius: 0;
}
.bb-ta:focus { outline: none; border-color: var(--bbc-or); }

/* Slider volume */
.bb-sl {
	width: 100%;
	-webkit-appearance: none;
	appearance: none;
	height: 3px;
	background: rgba(13, 13, 12, 0.2);
	outline: none;
	margin-top: 8px;
	border-radius: 0;
}
.bb-sl::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 20px; height: 20px;
	background: var(--bbc-noir);
	border-radius: 50%;
	cursor: pointer;
	border: 2px solid var(--bbc-cream);
	box-shadow: 0 0 0 1.5px var(--bbc-noir);
}
.bb-sl::-moz-range-thumb {
	width: 20px; height: 20px;
	background: var(--bbc-noir);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	border: 2px solid var(--bbc-cream);
	box-shadow: 0 0 0 1.5px var(--bbc-noir);
}
.bb-volv {
	font-size: 44px;
	font-weight: 200;
	letter-spacing: -0.03em;
	color: var(--bbc-noir);
	line-height: 1;
}
.bb-volu {
	font-size: 14px;
	color: rgba(13, 13, 12, 0.6);
	margin-left: 6px;
	font-weight: 400;
}

/* Mentions obligatoires / optionnel */
.bb-required {
	color: #BC534F;
	font-weight: 500;
	margin-left: 2px;
}
.bb-optional {
	color: rgba(13, 13, 12, 0.5);
	font-weight: 400;
	font-size: 10px;
	letter-spacing: 0.08em;
	text-transform: none;
	margin-left: 4px;
}
.bb-required-hint {
	display: inline-block;
	margin-left: 4px;
	font-size: 12px;
	color: rgba(13, 13, 12, 0.6);
}

/* Checkbox RGPD */
.bb-cb {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	font-size: 12px;
	cursor: pointer;
	line-height: 1.55;
	color: rgba(13, 13, 12, 0.85);
	margin-top: 6px;
}
.bb-cb input {
	margin-top: 3px;
	accent-color: var(--bbc-noir);
}

/* Honeypot — caché visuellement et au scan auto, mais pas en display:none */
.bb-honeypot {
	position: absolute;
	left: -10000px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* --- 10. Hint contextuel (sectoriel + LOA) --- */
.bb-hint {
	margin-top: 18px;
	padding: 14px 16px;
	background: var(--bbc-noir);
	color: var(--bbc-cream);
	font-size: 13px;
	line-height: 1.55;
	font-weight: 400;
	display: flex;
	gap: 10px;
	align-items: flex-start;
}
.bb-hint-mark {
	flex: 0 0 auto;
	width: 6px;
	height: 6px;
	background: var(--bbc-or);
	margin-top: 7px;
}
.bb-hint-strong { font-weight: 500; color: var(--bbc-or); }

/* --- 11. SIRENE auto-complete --- */
.bb-sirene {
	margin-top: 10px;
	padding: 12px 14px;
	background: var(--bbc-noir);
	color: var(--bbc-cream);
	font-size: 12.5px;
	line-height: 1.55;
}
.bb-sirene strong {
	color: var(--bbc-or);
	font-weight: 500;
	letter-spacing: .02em;
}
.bb-sirene-err {
	background: var(--bbc-terra);
	color: var(--bbc-cream);
}

/* --- 12. Récap + Reco écran 6 --- */
.bb-recap {
	background: var(--bbc-blanc);
	padding: 18px 20px;
	border: 1.5px solid var(--bbc-noir);
	margin-bottom: 14px;
}
.bb-rl {
	display: flex;
	justify-content: space-between;
	padding: 7px 0;
	font-size: 13px;
	border-bottom: 1px dashed rgba(13, 13, 12, 0.15);
	gap: 14px;
}
.bb-rl:last-child { border: 0; }
.bb-rk {
	color: rgba(13, 13, 12, 0.55);
	text-transform: uppercase;
	font-size: 10px;
	letter-spacing: .12em;
	white-space: nowrap;
	font-weight: 500;
}
.bb-rv { font-weight: 500; text-align: right; }

.bb-reco {
	background: var(--bbc-noir);
	color: var(--bbc-cream);
	padding: 26px;
	margin-bottom: 14px;
	position: relative;
	overflow: hidden;
}
.bb-reco::after {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	width: 72px;
	height: 72px;
	background: var(--bbc-or);
	clip-path: polygon(100% 0, 100% 100%, 0 0);
}
.bb-rect {
	font-size: 10px;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--bbc-or);
	margin-bottom: 12px;
	font-weight: 500;
	position: relative;
	z-index: 1;
}
.bb-recn {
	font-size: 30px;
	font-weight: 300;
	letter-spacing: -0.025em;
	margin-bottom: 6px;
	line-height: 1.05;
	position: relative;
	z-index: 1;
}
.bb-recs {
	font-size: 14px;
	color: rgba(237, 231, 220, 0.78);
	font-weight: 400;
	position: relative;
	z-index: 1;
}

/* --- 13. Erreur globale --- */
.bb-error {
	margin-top: 12px;
	padding: 10px 14px;
	background: var(--bbc-terra);
	color: var(--bbc-cream);
	font-size: 13px;
	font-weight: 400;
}

/* --- 14. Actions footer --- */
.bb-actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 20px 32px 28px;
	border-top: 1px solid rgba(13, 13, 12, 0.12);
	margin-top: 8px;
}
.bb-btn {
	font-family: inherit;
	font-weight: 500;
	letter-spacing: .06em;
	text-transform: uppercase;
	font-size: 11.5px;
	background: var(--bbc-noir);
	color: var(--bbc-cream);
	border: 1.5px solid var(--bbc-noir);
	padding: 14px 28px;
	cursor: pointer;
	transition: background .2s ease, color .2s ease, box-shadow .25s ease;
	border-radius: 0;
	position: relative;
}
.bb-btn:hover:not(:disabled) {
	background: transparent;
	color: var(--bbc-noir);
}
.bb-btn:focus-visible {
	outline: 2px solid var(--bbc-or);
	outline-offset: 2px;
}
.bb-btn:disabled {
	opacity: .28;
	cursor: not-allowed;
}
.bb-btn.pulse:not(:disabled) {
	animation: bbBtnPulse 2.2s ease-out infinite;
}
@keyframes bbBtnPulse {
	0%   { box-shadow: 0 0 0 0 rgba(168, 141, 92, 0.5); }
	70%  { box-shadow: 0 0 0 10px rgba(168, 141, 92, 0); }
	100% { box-shadow: 0 0 0 0 rgba(168, 141, 92, 0); }
}
.bb-bg {
	background: transparent;
	color: var(--bbc-noir);
}
.bb-bg:hover:not(:disabled) {
	background: var(--bbc-noir);
	color: var(--bbc-cream);
}
.bb-spacer { flex: 1; }

/* --- 15. Alpine cloak (anti-FOUC) --- */
[x-cloak] { display: none !important; }

/* --- 16. Responsive --- */
@media (max-width: 600px) {
	.bb-body    { padding: 28px 22px 8px; }
	.bb-actions { padding: 18px 22px 22px; }
	.bb-hd      { padding: 20px 22px; }
	.bb-title   { font-size: 32px; }
	.bb-grid-3  { grid-template-columns: repeat(2, 1fr); }
	.bb-grid-5  { grid-template-columns: repeat(3, 1fr); }
	.bb-row     { grid-template-columns: 1fr; }
	.bb-logo    { width: 138px; height: 28px; }
	.bb-recn    { font-size: 24px; }
}
