/* Polices Poppins (titres) / Open Sans (corps) : auto-hébergées via « Aegis+ › Réglages généraux »
   (upload de typo, aucun appel à Google Fonts). Sans téléversement : repli sur les polices système. */
/* Aegis-Contact — formulaires front. Classes agc-* uniquement. Palette/typo maquette. */

.agc-form {
	--agc-accent: #51B148;
	--agc-accent-dark: #45993D;
	--agc-ink: #171B1F;
	--agc-text: #2B3033;
	--agc-muted: #5E6468;
	--agc-line: #E2E5E8;
	--agc-soft: #EFF2F5;
	--agc-pill: #E7F2E6;
	max-width: 720px;
	margin: 0 auto;
	color: var(--agc-text);
	font-family: 'Open Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.6;
}
.agc-form *, .agc-form *::before, .agc-form *::after { box-sizing: border-box; }
.agc-form--card { background: #fff; border: 1px solid var(--agc-line); border-radius: 22px; padding: 34px 32px; box-shadow: 0 12px 32px rgba(15,23,42,.08); }
@media (max-width: 560px) { .agc-form--card { padding: 24px 18px; border-radius: 16px; } }

/* En-tête maquette : pastille icône verte + titre + sous-titre (+ croix en fenêtre). */
.agc-form__head { display: flex; align-items: center; gap: 13px; margin: 0 0 20px; }
.agc-form__ico { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 44px; height: 44px; border-radius: 13px; background: var(--agc-pill); color: var(--agc-accent); }
.agc-form__ico svg { width: 22px; height: 22px; }
.agc-form__title { font-family: 'Poppins', system-ui, sans-serif; font-weight: 700; color: var(--agc-ink); font-size: 1.25rem; margin: 0; line-height: 1.2; }
.agc-form__sub { color: var(--agc-muted); margin: 2px 0 0; font-size: .85rem; }
.agc-form__head .agc-modal__close, .agc-form button.agc-modal__close { margin-left: auto; align-self: flex-start; flex: 0 0 auto; width: 34px; height: 34px; padding: 0; border: 0 !important; border-radius: 50% !important; background: var(--agc-soft) !important; color: var(--agc-muted) !important; font-size: 22px; line-height: 1; cursor: pointer; box-shadow: none !important; transition: background .15s ease, color .15s ease; }
.agc-form__head .agc-modal__close:hover, .agc-form button.agc-modal__close:hover { background: #E3E7EA !important; color: var(--agc-ink) !important; }

/* Champs */
.agc-form p { margin: 0 0 16px; }
.agc-form label { display: block; font-weight: 600; color: var(--agc-ink); font-size: .92rem; margin-bottom: 6px; }
.agc-req { color: var(--agc-accent); }
.agc-form input[type=text], .agc-form input[type=email], .agc-form input[type=tel],
.agc-form input[type=date], .agc-form select, .agc-form textarea {
	width: 100%; padding: 12px 14px; border: 1px solid var(--agc-line); border-radius: 12px;
	background: #fff; color: var(--agc-text); font: inherit; font-size: .98rem;
	transition: border-color .15s ease, box-shadow .15s ease; appearance: none; -webkit-appearance: none;
}
.agc-form select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235E6468' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.agc-form input:focus, .agc-form select:focus, .agc-form textarea:focus { outline: none; border-color: var(--agc-accent); box-shadow: 0 0 0 3px rgba(81,177,72,.18); }
.agc-form textarea { resize: vertical; min-height: 120px; }
.agc-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 560px) { .agc-grid2 { grid-template-columns: 1fr; gap: 0; } }

/* Honeypot : hors écran (pas display:none, certains bots le détectent). */
.agc-hp { position: absolute !important; left: -9999px !important; top: -9999px !important; height: 1px; width: 1px; overflow: hidden; }

/* Encart produit (devis) */
.agc-form__product { background: var(--agc-pill); border: 1px solid #CFE6CC; border-radius: 14px; padding: 14px 18px; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.agc-form__product-label { color: var(--agc-muted); font-size: .88rem; }
.agc-form__product strong { font-family: 'Poppins', system-ui, sans-serif; color: var(--agc-ink); font-size: 1.05rem; }
.agc-form__product-color { color: var(--agc-accent-dark); font-weight: 600; font-size: .92rem; }

/* Bouton flottant « contact express » (rond, en bas à droite). */
.agc-fab {
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 9998;
	width: 58px;
	height: 58px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	/* Couleur pilotée par une variable (réglable) ; !important bat le style rose
	   que le thème applique aux <button>. La var permet quand même une couleur perso. */
	background: radial-gradient(circle at 32% 26%, rgba(255,255,255,.30), rgba(255,255,255,0) 58%), var(--agc-fab-bg, #51B148) !important;
	color: #fff !important;
	border: 0 !important;
	cursor: pointer;
	box-shadow: 0 12px 26px rgba(31,110,20,.42), 0 3px 8px rgba(0, 0, 0, .16);
	transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.agc-fab:hover, .agc-fab:focus-visible { transform: translateY(-2px) scale(1.04); box-shadow: 0 14px 32px rgba(0, 0, 0, .28); outline: none; filter: brightness(.93); }
.agc-fab:active { transform: scale(.96); }
/* !important + width ET height : le thème impose une taille (1em, déformée) aux
   <svg> des boutons → sans ça l'icône reste minuscule quand on agrandit le bouton.
   46% du diamètre → l'icône suit toujours la taille réglée. */
/* Taille de l'icône en PX calculée (46% du diamètre, posée en variable inline)
   → carrée et proportionnelle à la taille du bouton. Le % se résolvait mal (svg
   déformé) ; une valeur px fixe est fiable. */
.agc-fab svg { display: block !important; width: var(--agc-fab-ic, 26px) !important; height: var(--agc-fab-ic, 26px) !important; max-width: none !important; flex: 0 0 auto !important; }
/* Image personnalisée : remplit le bouton. */
.agc-fab--logo { padding: 0; overflow: hidden; }
.agc-fab__logo { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.agc-fab--hide-mobile { }
@media (max-width: 600px) {
	.agc-fab { right: 16px; bottom: 16px; }
	.agc-fab--hide-mobile { display: none !important; }
}

/* Champ « Agence à contacter » + note « modèle indisponible à… » */
.agc-field-agence { position: relative; }
.agc-agence-note { display: block; margin-top: 6px; color: var(--agc-accent-dark); font-size: .8rem; line-height: 1.4; }
.agc-agence-note[hidden] { display: none; }

/* Mention rassurante sous un champ (ex. téléphone : pas de revente / démarchage). */
.agc-field__hint { display: block; margin-top: 5px; font-size: .76rem; line-height: 1.4; color: var(--agc-muted); }
/* Version pleine largeur : la note s'étend sur toute la rangée de la grille
   (et non sur la seule cellule du champ téléphone). */
.agc-grid2 > .agc-field__hint--full { grid-column: 1 / -1; margin-top: 2px; }

/* RGPD */
.agc-form__rgpd label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--agc-muted); font-size: .85rem; line-height: 1.5; cursor: pointer; }
.agc-form__rgpd input { margin-top: 3px; accent-color: var(--agc-accent); width: 16px; height: 16px; flex: 0 0 auto; }

/* Inscription newsletter : case d'opt-in + ligne de thèmes révélée au clic. */
.agc-form__news { margin: 2px 0 2px; }
.agc-news__optin label { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; color: var(--agc-ink, #2b3440); font-size: .9rem; line-height: 1.4; cursor: pointer; margin: 0; }
.agc-news__optin input { margin-top: 2px; accent-color: var(--agc-accent); width: 16px; height: 16px; flex: 0 0 auto; }
.agc-news__cats { margin: 10px 0 0; padding: 12px 14px; border: 1px dashed var(--agc-line, #dfe4e8); border-radius: 12px; background: color-mix(in srgb, var(--agc-accent) 5%, #fff); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.agc-news__cats[hidden] { display: none; }
.agc-news__cats-label { flex: 1 1 100%; font-size: .8rem; font-weight: 700; color: var(--agc-muted); text-transform: uppercase; letter-spacing: .03em; }
.agc-news__cats label { display: inline-flex; gap: 7px; align-items: center; font-size: .86rem; color: var(--agc-ink, #2b3440); cursor: pointer; }
.agc-news__cats input { accent-color: var(--agc-accent); width: 15px; height: 15px; flex: 0 0 auto; }

/* Bouton — sélecteurs renforcés + !important : les kits Elementor stylent
   « button » (0,1,1) plus fort qu'une simple classe, et repeignent le bouton
   en rouge/blanc. On reprend la main quoi qu'il arrive. */
.agc-form__actions { margin-top: 6px; }
.agc-form__form .agc-form__submit, .agc-form button.agc-form__submit {
	display: inline-flex; align-items: center; gap: 8px; padding: 14px 30px; cursor: pointer;
	border: 0 !important; background: var(--agc-accent) !important; color: #fff !important;
	font: inherit; font-weight: 700; border-radius: 999px !important;
	font-family: 'Poppins', system-ui, sans-serif; box-shadow: 0 8px 20px rgba(81,177,72,.28) !important;
	transition: background .15s ease, transform .15s ease; text-transform: none; letter-spacing: normal;
}
.agc-form__form .agc-form__submit:hover, .agc-form button.agc-form__submit:hover { background: var(--agc-accent-dark) !important; color: #fff !important; transform: translateY(-1px); }
.agc-form__form .agc-form__submit[disabled] { opacity: .6; cursor: wait; transform: none; }
@media (max-width: 560px) { .agc-form__form .agc-form__submit { width: 100%; justify-content: center; } }

/* Notices */
.agc-form__notice { border-radius: 12px; padding: 14px 18px; margin: 0 0 18px; font-weight: 600; }
.agc-form__notice.is-ok { background: var(--agc-pill); border: 1px solid #CFE6CC; color: #2F6B2A; }
.agc-form__notice.is-err { background: #FDECEC; border: 1px solid #F5C6C6; color: #A33A3A; }
.agc-form__form .agc-form__notice { margin: 14px 0 0; }

/* ---------------- Chips d'horaires (RDV) ---------------- */
.agc-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: -4px 0 16px; }
.agc-slots .agc-slot, .agc-slots button.agc-slot { padding: 8px 6px; border: 1px solid var(--agc-line) !important; border-radius: 9px !important; background: #fff !important; color: var(--agc-text) !important; font: 600 .85rem 'Open Sans', system-ui, sans-serif; cursor: pointer; text-align: center; box-shadow: none !important; transition: all .12s ease; }
.agc-slots .agc-slot:hover { border-color: var(--agc-accent) !important; color: var(--agc-accent-dark) !important; background: #fff !important; }
.agc-slots .agc-slot.is-on, .agc-slots .agc-slot.is-on:hover { background: var(--agc-accent) !important; border-color: var(--agc-accent) !important; color: #fff !important; }

/* ---------------- Envoi réussi : ne reste que la confirmation ---------------- */
.agc-form__form.is-sent > *:not(.agc-form__notice) { display: none; }

/* ---------------- Fenêtre superposée (overlay dans la page, sans rechargement) ---------------- */
html.agc-locked, html.agc-locked body { overflow: hidden; }
.agc-modal { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 24px; }
.agc-modal__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; transition: opacity .2s ease; cursor: pointer; }
.agc-modal__card { position: relative; z-index: 1; width: 100%; max-width: min(440px, 94vw); max-height: calc(100vh - 48px); overflow-y: auto; overflow-x: hidden; background: #fff; border-radius: 18px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.45); opacity: 0; transform: translateY(14px) scale(.98); transition: opacity .2s ease, transform .2s ease; overscroll-behavior: contain; }
/* Aucun média (images/vidéos) ne dépasse jamais la fenêtre. */
.agc-form img, .agc-modal__card img { max-width: 100%; height: auto; }
.agc-form__product { max-width: 100%; }
.agc-modal.is-open .agc-modal__backdrop { opacity: 1; }
.agc-modal.is-open .agc-modal__card { opacity: 1; transform: none; }
.agc-modal .agc-form--in-modal { padding: 24px 24px 26px; max-width: none; }
.agc-modal .agc-form--in-modal .agc-form__form p { margin-bottom: 13px; }
.agc-modal .agc-form--in-modal textarea { min-height: 84px; }
@media (max-width: 560px) {
	.agc-modal { padding: 12px; align-items: flex-end; }
	.agc-modal__card { max-height: calc(100vh - 24px); border-radius: 16px; }
	/* Marges internes réduites sur téléphone (plus de place pour les champs). */
	.agc-modal .agc-form--in-modal { padding: 20px 16px 22px; }
}
/* Très petits écrans (~320–360px) : encore un cran de gain de place + puces horaires garanties. */
@media (max-width: 360px) {
	.agc-modal { padding: 8px; }
	.agc-modal .agc-form--in-modal { padding: 18px 13px 20px; }
	.agc-slots { gap: 6px; }
	.agc-slots .agc-slot, .agc-slots button.agc-slot { padding: 8px 4px; font-size: .8rem; }
	.agc-form--card { padding: 22px 14px; }
}

/* ---------------- Bouton [aegis_rdv] : jamais de débordement sur téléphone ----------------
   (le CSS de base du bouton est auto-porté par le shortcode ; on ajoute seulement
   des garde-fous responsive ici, sans toucher au rendu ≥ tablette.) */
.agc-rdv-btn { max-width: 100%; }
@media (max-width: 480px) {
	.agc-rdv-wrap { flex-wrap: wrap; }
	.agc-rdv-btn { white-space: normal; text-align: center; word-break: break-word; }
}

/* Mobile : empilement propre des boutons flottants. Le chatbot est au coin
   bas-droite (bottom 18, ~58px) ; le bouton « contact express » se place
   juste au-dessus dans la même colonne → plus de superposition. */
@media (max-width: 600px) {
	.agc-fab { bottom: 84px !important; right: 16px !important; }
	/* Réduction modérée des 2 FAB sur téléphone (un peu trop gros) : 58 → 50 px,
	   zone de tap toujours ≥ 44 px. On coordonne aussi le chatbot (.acb-fab, autre
	   plugin) pour garder les deux boutons de la même taille. */
	.agc-fab, .acb-fab { width: 50px !important; height: 50px !important; }
	.agc-fab svg { width: 22px !important; height: 22px !important; }
	.acb-fab svg { width: 27px !important; height: 27px !important; }
}

/* Mobile : masquer/afficher les boutons flottants par glissement vers la droite.
   Les 2 FAB (chatbot .acb-fab + contact .agc-fab) glissent hors écran ; une petite
   languette au bord droit les rappelle. */
@media (max-width: 600px) {
	.acb-fab, .agc-fab { transition: transform .28s ease, opacity .28s ease; }
	/* Fiabilise le geste : sans ceci le navigateur peut « prendre la main » sur
	   un glissé horizontal (pan de page) et annuler le toucher (touchcancel)
	   avant le touchend qui masque les FAB. pan-y = seul le défilement vertical
	   reste natif, l'horizontal est à nous. */
	.acb-fab, .agc-fab { touch-action: pan-y; }
	/* Bannière de consentement Aegis affichée (fond opaque, z-index 99999 > FAB
	   9998) : elle recouvrirait les FAB et avalerait leurs gestes → front.js les
	   remonte juste au-dessus d'elle (--aegis-consent-clear = hauteur mesurée). */
	body.aegis-consent-open .acb-fab,
	body.aegis-consent-open .agc-fab { transform: translateY(calc(-1 * var(--aegis-consent-clear, 215px))); }
	/* La languette reste toujours au bord droit (translateX(0)) ; sous la
	   bannière de consentement elle est simplement remontée avec les FAB. */
	body.aegis-consent-open .aegis-fab-handle { transform: translateX(0) translateY(calc(-1 * var(--aegis-consent-clear, 215px))) !important; }
	body.aegis-fabs-hidden .acb-fab,
	body.aegis-fabs-hidden .agc-fab {
		transform: translateX(200%) !important;
		opacity: 0;
		pointer-events: none;
	}
	/* Languette de rétraction/rappel : poignée fine TOUJOURS visible au bord
	   droit (côté cohérent avec le glissement des FAB vers la droite). Un tap
	   bascule l'état (voir front.js) ; elle ne se déplace donc pas selon l'état. */
	.aegis-fab-handle {
		position: fixed;
		right: 0;
		bottom: 60px;
		z-index: 9999; /* > FAB (9998) : reste tappable même FAB visibles. */
		width: 16px !important;
		height: 82px !important;
		min-width: 0 !important;
		padding: 0 !important;
		margin: 0;
		/* !important : bat le style rouge/rose que le thème applique aux <button>. */
		border: 0 !important;
		border-radius: 12px 0 0 12px;
		background: #45993D !important;
		color: #fff !important;
		box-shadow: -3px 3px 12px rgba(0, 0, 0, .22);
		cursor: pointer;
		font-size: 16px;
		line-height: 1;
		display: flex;
		align-items: center;
		justify-content: center;
		transform: translateX(0);
		transition: transform .28s ease;
	}
}
/* Sur écran large, la languette n'existe pas (créée en JS uniquement sur mobile). */
@media (min-width: 601px) { .aegis-fab-handle { display: none !important; } }
