/* Géobioénergie – composants (formulaires, formations, chatbot, réassurance, villes) */
:root {
	--gbe-green: #2c4a28;
	--gbe-green-2: #3a5a34;
	--gbe-green-dark: #1a2819;
	--gbe-sage: #7e9454;
	--gbe-beige: #fcf8cf;
	--gbe-beige-soft: #fdfbea;
	--gbe-cream: #f6fcf3;
	--gbe-gold: #ffc114;
	--gbe-orange: #ffa84b;
	--gbe-text: #4a5148;
	--gbe-line: rgba(44, 74, 40, .14);
	--gbe-radius: 18px;
	--gbe-shadow: 0 18px 40px -22px rgba(26, 40, 25, .35);
	--gbe-wa: #25d366;
}

/* ---------- Boutons ---------- */
.gbe-btn-solid,
.gbe-btn-ghost {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	padding: .95em 1.6em; border-radius: 999px; font-weight: 700; line-height: 1.1;
	text-decoration: none; cursor: pointer; transition: transform .2s, background .2s, color .2s, box-shadow .2s;
	border: 2px solid var(--gbe-green); font-size: 1rem;
}
.gbe-btn-solid { background: var(--gbe-green); color: #fff; }
.gbe-btn-solid:hover, .gbe-btn-solid:focus-visible { background: var(--gbe-green-dark); border-color: var(--gbe-green-dark); color: #fff; transform: translateY(-2px); box-shadow: var(--gbe-shadow); }
.gbe-btn-ghost { background: transparent; color: var(--gbe-green); }
.gbe-btn-ghost:hover, .gbe-btn-ghost:focus-visible { background: var(--gbe-green); color: #fff; }
.gbe-pdf::before { content: ""; width: 1em; height: 1.15em; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8zm-1 7V3.5L18.5 9zM8 13h8v2H8zm0 4h8v2H8z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8zm-1 7V3.5L18.5 9zM8 13h8v2H8zm0 4h8v2H8z'/%3E%3C/svg%3E") center/contain no-repeat; }

/* ---------- Formulaires ---------- */
.gbe-form-wrap { background: #fff; border-radius: var(--gbe-radius); padding: clamp(20px, 3vw, 34px); box-shadow: var(--gbe-shadow); border: 1px solid var(--gbe-line); color: var(--gbe-text); }
.gbe-form-wrap.is-compact { padding: 22px; }
.gbe-form__title { font-family: var(--gbe-font-head, Georgia, serif); font-size: 1.45rem; color: var(--gbe-green); margin: 0 0 .25em; font-weight: 600; line-height: 1.2; }
.gbe-form__subtitle { margin: 0 0 1.2em; font-size: .95rem; }
.gbe-form .gbe-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.is-compact .gbe-form .gbe-row { grid-template-columns: 1fr; }
.gbe-form .gbe-row .gbe-field--sm { max-width: 140px; }
.gbe-field { margin: 0 0 14px; }
.gbe-field label { display: block; font-size: .82rem; font-weight: 700; color: var(--gbe-green); margin: 0 0 6px; letter-spacing: .01em; }
.gbe-field input, .gbe-field select, .gbe-field textarea {
	width: 100%; box-sizing: border-box; border: 1.5px solid #dfe6d5; background: var(--gbe-beige-soft); border-radius: 12px;
	padding: 12px 14px; font: inherit; font-size: 1rem; color: var(--gbe-green-dark); transition: border-color .2s, box-shadow .2s, background .2s;
}
.gbe-field textarea { resize: vertical; min-height: 96px; }
.gbe-field input:focus, .gbe-field select:focus, .gbe-field textarea:focus { outline: none; border-color: var(--gbe-green); background: #fff; box-shadow: 0 0 0 4px rgba(44, 74, 40, .12); }
.gbe-form.was-validated :invalid { border-color: #c0392b; }
.gbe-consent { font-size: .8rem; line-height: 1.45; margin: 4px 0 16px; }
.gbe-consent label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.gbe-consent input { margin-top: 2px; width: 18px; height: 18px; accent-color: var(--gbe-green); flex: 0 0 auto; }
.gbe-submit { margin: 0; }
.gbe-submit .gbe-btn-solid { width: 100%; padding: 1.05em 1.4em; font-size: 1.05rem; background: var(--gbe-orange); border-color: var(--gbe-orange); color: var(--gbe-green-dark); }
.gbe-submit .gbe-btn-solid:hover { background: var(--gbe-green); border-color: var(--gbe-green); color: #fff; }
.gbe-reassure { text-align: center; font-size: .78rem; margin: 10px 0 0; opacity: .8; }
.gbe-reassure::before { content: "🔒 "; }
.gbe-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.gbe-form__msg:empty { display: none; }
.gbe-form__msg { margin-top: 12px; padding: 10px 14px; border-radius: 10px; font-size: .9rem; }
.gbe-form__msg.is-error { background: #fdecea; color: #922b21; }
.gbe-form__success { text-align: center; padding: 26px 10px; color: var(--gbe-green-dark); outline: none; }
.gbe-form__success strong { display: block; font-size: 1.1rem; line-height: 1.4; color: var(--gbe-green); }
.gbe-form__check { display: inline-grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: var(--gbe-green); color: #fff; font-size: 1.7rem; margin-bottom: 12px; }
@media (max-width: 600px) { .gbe-form .gbe-row { grid-template-columns: 1fr; } .gbe-form .gbe-row .gbe-field--sm { max-width: none; } }

/* ---------- Cartes formations ---------- */
.gbe-fgrid { display: grid; gap: 26px; grid-template-columns: repeat(var(--gbe-cols, 3), minmax(0, 1fr)); }
@media (max-width: 1024px) { .gbe-fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .gbe-fgrid { grid-template-columns: 1fr; } }
.gbe-fcard { display: flex; flex-direction: column; background: #fff; border-radius: var(--gbe-radius); overflow: hidden; border: 1px solid var(--gbe-line); box-shadow: 0 10px 30px -24px rgba(26,40,25,.5); transition: transform .3s, box-shadow .3s; }
.gbe-fcard:hover { transform: translateY(-6px); box-shadow: var(--gbe-shadow); }
.gbe-fcard__media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--gbe-cream); }
.gbe-fcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; display: block; }
.gbe-fcard:hover .gbe-fcard__media img { transform: scale(1.06); }
.gbe-fcard__badge { position: absolute; top: 14px; left: 14px; background: var(--gbe-gold); color: var(--gbe-green-dark); font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 6px 12px; border-radius: 999px; }
.gbe-fcard--complet .gbe-fcard__badge { background: #fff; color: #c0392b; }
.gbe-fcard__body { padding: 22px 22px 20px; display: flex; flex-direction: column; flex: 1; }
.gbe-fcard__title { font-family: var(--gbe-font-head, Georgia, serif); font-size: 1.25rem !important; line-height: 1.25; margin: 0 0 12px !important; font-weight: 600; }
.gbe-fcard__title a { color: var(--gbe-green-dark); text-decoration: none; }
.gbe-fcard__title a:hover { color: var(--gbe-green); }
.gbe-fcard__meta { list-style: none; margin: 0 0 18px; padding: 0; font-size: .9rem; display: grid; gap: 6px; }
.gbe-fcard__meta li { display: flex; gap: 8px; align-items: center; color: var(--gbe-text); }
.gbe-fcard__meta li::before { content: ""; width: 16px; height: 16px; flex: 0 0 16px; background: var(--gbe-sage); -webkit-mask: var(--i) center/contain no-repeat; mask: var(--i) center/contain no-repeat; }
.gbe-fcard__meta .is-date { font-weight: 700; color: var(--gbe-green); --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 2v2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-2V2h-2v2H9V2zm-2 8h14v10H5z'/%3E%3C/svg%3E"); }
.gbe-fcard__meta .is-place { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.25 7 13 7 13s7-7.75 7-13a7 7 0 0 0-7-7m0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5'/%3E%3C/svg%3E"); }
.gbe-fcard__meta .is-price { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21.4 11.6 12.4 2.6A2 2 0 0 0 11 2H4a2 2 0 0 0-2 2v7c0 .55.22 1.05.59 1.42l9 9a2 2 0 0 0 2.82 0l7-7a2 2 0 0 0-.01-2.82M5.5 7A1.5 1.5 0 1 1 7 5.5 1.5 1.5 0 0 1 5.5 7'/%3E%3C/svg%3E"); }
.gbe-fcard__actions { margin-top: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.gbe-fcard__actions a { flex: 1; text-align: center; padding: .8em 1em; border-radius: 999px; font-weight: 700; font-size: .92rem; text-decoration: none; transition: background .2s, color .2s; white-space: nowrap; }
.gbe-fcard__more { border: 2px solid var(--gbe-green); color: var(--gbe-green); }
.gbe-fcard__more:hover { background: var(--gbe-green); color: #fff; }
.gbe-fcard__cta { background: var(--gbe-orange); color: var(--gbe-green-dark); border: 2px solid var(--gbe-orange); }
.gbe-fcard__cta:hover { background: var(--gbe-green); border-color: var(--gbe-green); color: #fff; }
.gbe-fgrid--list { grid-template-columns: 1fr !important; gap: 16px; }
.gbe-fgrid--list .gbe-fcard { flex-direction: row; }
.gbe-fgrid--list .gbe-fcard__media { flex: 0 0 240px; aspect-ratio: auto; min-height: 170px; }
@media (max-width: 640px) { .gbe-fgrid--list .gbe-fcard { flex-direction: column; } .gbe-fgrid--list .gbe-fcard__media { flex: none; aspect-ratio: 16/9; min-height: 0; } }
.gbe-empty { padding: 20px; background: var(--gbe-cream); border-radius: 14px; }

/* ---------- Fiche formation ---------- */
.gbe-finfo { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 0 0 28px; }
.gbe-finfo__row { background: var(--gbe-cream); border: 1px solid var(--gbe-line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.gbe-finfo__row span { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gbe-sage); font-weight: 800; }
.gbe-finfo__row strong { color: var(--gbe-green-dark); }
.gbe-fsignup { margin-top: 48px; scroll-margin-top: 120px; }
.gbe-fsignup__pdf { margin-top: 14px; font-size: .95rem; }

/* ---------- Bloc inscription + PDF ---------- */
.gbe-signup { background: var(--gbe-green); color: #fff; border-radius: var(--gbe-radius); padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.gbe-signup__title { font-family: var(--gbe-font-head, Georgia, serif); font-size: 1.35rem; margin: 0; color: var(--gbe-gold); font-weight: 600; }
.gbe-signup__text { margin: 0 0 6px; font-size: .92rem; color: rgba(255,255,255,.85); }
.gbe-signup .gbe-btn-solid { background: var(--gbe-orange); border-color: var(--gbe-orange); color: var(--gbe-green-dark); }
.gbe-signup .gbe-btn-solid:hover { background: #fff; border-color: #fff; color: var(--gbe-green); }
.gbe-signup .gbe-btn-ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.gbe-signup .gbe-btn-ghost:hover { background: #fff; color: var(--gbe-green); }
.gbe-signup--inline { flex-direction: row; flex-wrap: wrap; align-items: center; }
.gbe-signup--inline .gbe-signup__text { flex: 1 1 260px; }

/* ---------- Réassurance ---------- */
.gbe-reassurance { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.gbe-reassurance li { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--gbe-line); border-radius: 16px; padding: 16px 18px; }
.gbe-reassurance__icon { flex: 0 0 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--gbe-beige); color: var(--gbe-green); font-size: 20px; }
.gbe-reassurance__icon svg { width: 20px; height: 20px; fill: currentColor; }
.gbe-reassurance strong { display: block; color: var(--gbe-green-dark); line-height: 1.25; }
.gbe-reassurance small { display: block; font-size: .85rem; opacity: .85; line-height: 1.35; margin-top: 2px; }
.gbe-reassurance--dark li { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.14); }
.gbe-reassurance--dark strong { color: #fff; }
.gbe-reassurance--dark small { color: rgba(255,255,255,.8); }
.gbe-reassurance--dark .gbe-reassurance__icon { background: var(--gbe-gold); color: var(--gbe-green-dark); }

/* ---------- Villes ---------- */
.gbe-villes { list-style: none; margin: 0; padding: 0; }
.gbe-villes--chips { display: flex; flex-wrap: wrap; gap: 8px; }
.gbe-villes--chips a, .gbe-villes--list a, .gbe-villes--top a { display: inline-block; padding: 7px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--gbe-line); color: var(--gbe-green); text-decoration: none; font-size: .9rem; font-weight: 600; transition: background .2s, color .2s; }
.gbe-villes--chips a:hover, .gbe-villes--list a:hover, .gbe-villes--top a:hover { background: var(--gbe-green); color: #fff; }
.gbe-villes--list, .gbe-villes--top { display: flex; flex-wrap: wrap; gap: 8px; }
.gbe-villes span { opacity: .6; font-weight: 400; font-size: .8em; }
.gbe-villes-groups { display: grid; gap: 12px; }
.gbe-villes-group { background: var(--gbe-cream); border: 1px solid var(--gbe-line); border-radius: 16px; padding: 4px 18px; }
.gbe-villes-group summary { cursor: pointer; font-weight: 800; color: var(--gbe-green); padding: 12px 0; list-style-position: inside; }
.gbe-villes-group summary span { font-weight: 400; opacity: .7; }
.gbe-villes-group ul { padding-bottom: 16px; }

/* ---------- Chatbot WhatsApp ---------- */
.gbe-chat { position: fixed; right: 20px; bottom: 20px; z-index: 9990; font-size: 15px; }
.gbe-chat__toggle { width: 62px; height: 62px; border-radius: 50%; border: 0; background: var(--gbe-wa); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 12px 28px -8px rgba(0,0,0,.45); transition: transform .25s; position: relative; }
.gbe-chat__toggle:hover { transform: scale(1.07); }
.gbe-chat__toggle:focus-visible { outline: 3px solid var(--gbe-gold); outline-offset: 3px; }
.gbe-chat__dot { position: absolute; top: 4px; right: 4px; width: 14px; height: 14px; border-radius: 50%; background: #ff3b30; border: 2px solid #fff; }
.gbe-chat[data-open="1"] .gbe-chat__dot { display: none; }
.gbe-chat.is-nudge .gbe-chat__toggle { animation: gbe-pulse 1.6s ease-out 3; }
@keyframes gbe-pulse { 0% { box-shadow: 0 0 0 0 rgba(37,211,102,.6); } 100% { box-shadow: 0 0 0 22px rgba(37,211,102,0); } }
.gbe-chat__panel { position: absolute; right: 0; bottom: 78px; width: min(360px, calc(100vw - 32px)); background: #f0ebe3; border-radius: 20px; overflow: hidden; box-shadow: 0 24px 60px -18px rgba(0,0,0,.45); display: flex; flex-direction: column; max-height: min(560px, calc(100vh - 120px)); }
.gbe-chat__panel[hidden] { display: none; }
.gbe-chat__head { background: #075e54; color: #fff; display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.gbe-chat__head strong { display: block; font-size: .98rem; }
.gbe-chat__head small { opacity: .8; font-size: .78rem; }
.gbe-chat__avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--gbe-beige); color: var(--gbe-green); display: grid; place-items: center; font-weight: 800; flex: 0 0 40px; }
.gbe-chat__close { margin-left: auto; background: none; border: 0; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; padding: 4px 6px; }
.gbe-chat__body { padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.gbe-msg { max-width: 85%; padding: 9px 12px; border-radius: 12px; line-height: 1.4; box-shadow: 0 1px 1px rgba(0,0,0,.08); white-space: pre-wrap; }
.gbe-msg--bot { background: #fff; align-self: flex-start; border-top-left-radius: 4px; color: #1f2c1e; }
.gbe-msg--me { background: #dcf8c6; align-self: flex-end; border-top-right-radius: 4px; color: #1f2c1e; }
.gbe-chat__choices { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.gbe-chat__choices button { text-align: left; background: #fff; border: 1.5px solid #075e54; color: #075e54; border-radius: 999px; padding: 9px 14px; cursor: pointer; font: inherit; font-weight: 600; transition: background .2s, color .2s; }
.gbe-chat__choices button:hover, .gbe-chat__choices button:focus-visible { background: #075e54; color: #fff; }
.gbe-chat__choices button.is-wa { background: var(--gbe-wa); border-color: var(--gbe-wa); color: #fff; text-align: center; }
.gbe-chat__choices button:disabled { opacity: .5; cursor: default; }
.gbe-chat__form { display: flex; gap: 8px; padding: 10px; background: #f0ebe3; border-top: 1px solid rgba(0,0,0,.06); }
.gbe-chat__form[hidden] { display: none; }
.gbe-chat__form input[type="text"], .gbe-chat__form input[type="tel"] { flex: 1; border: 0; border-radius: 999px; padding: 11px 16px; font: inherit; background: #fff; min-width: 0; }
.gbe-chat__form input:focus { outline: 2px solid #075e54; }
.gbe-chat__form button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: #075e54; color: #fff; cursor: pointer; flex: 0 0 44px; }
.gbe-chat__legal { margin: 0; padding: 0 14px 10px; font-size: .7rem; color: #6b6b6b; }
.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 767px) { .gbe-chat { right: 14px; bottom: 82px; } }
@media (prefers-reduced-motion: reduce) { .gbe-fcard, .gbe-fcard__media img, .gbe-chat__toggle { transition: none; } .gbe-chat.is-nudge .gbe-chat__toggle { animation: none; } }
