/*
Theme Name: Hello Elementor Child
Theme URI: https://0m7qwcgjhw.preview.infomaniak.website/
Description: Thème enfant de Hello Elementor
Author: Anthony
Template: hello-elementor
Version: 1.0.0
Text Domain: hello-elementor-child
*/

/* ==========================================================================
   Formulaire de devis
   ========================================================================== */

/* Éléments masqués par le script */
.hec-hidden{
	display: none !important;
}

/* Couleurs du formulaire (à ajuster ici) */
form[name="Demande de devis"]{
	--hec-primary: #014b77;
	--hec-primary-soft: rgba(1, 75, 119, 0.07);
	--hec-primary-ring: rgba(1, 75, 119, 0.16);
	--hec-step: #014b77;
	--hec-step-dark: #014b77;
	--hec-step-ring: rgba(1, 75, 119, 0.2);
	--hec-muted: #babfc5;
	--hec-muted-text: #8a929b;
	--hec-border: #cfd6df;
	--hec-border-strong: #69727d;
	--hec-text: #3b434c;
}

/* --------------------------------------------------------------------------
   Étapes
   -------------------------------------------------------------------------- */

form[name="Demande de devis"] .e-form__indicators__indicator__number{
	box-sizing: border-box;
	position: relative;
	padding: 0;
	border: 2px solid var(--hec-muted) !important;
	border-radius: 50% !important;
	background: #fff !important;
	color: var(--hec-muted-text) !important;
	font-weight: 600;
	line-height: 1;
	transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

form[name="Demande de devis"] .e-form__indicators__indicator__label{
	margin-top: 8px;
	color: var(--hec-muted-text) !important;
	font-weight: 500;
	letter-spacing: 0.01em;
	transition: color 0.25s ease;
}

/* Étape en cours */
form[name="Demande de devis"] .e-form__indicators__indicator--state-active .e-form__indicators__indicator__number{
	border-color: var(--hec-step) !important;
	background: var(--hec-step) !important;
	color: #fff !important;
	box-shadow: 0 0 0 5px var(--hec-step-ring);
}

form[name="Demande de devis"] .e-form__indicators__indicator--state-active .e-form__indicators__indicator__label{
	color: var(--hec-step-dark) !important;
	font-weight: 600;
}

/* Étape terminée : coche à la place du chiffre */
form[name="Demande de devis"] .e-form__indicators__indicator--state-completed .e-form__indicators__indicator__number{
	border-color: var(--hec-step) !important;
	background: var(--hec-step) !important;
	color: transparent !important;
}

form[name="Demande de devis"] .e-form__indicators__indicator--state-completed .e-form__indicators__indicator__number::after{
	content: "";
	position: absolute;
	top: 46%;
	left: 50%;
	width: 5px;
	height: 10px;
	border: solid #fff;
	border-width: 0 2.5px 2.5px 0;
	transform: translate(-50%, -55%) rotate(45deg);
}

form[name="Demande de devis"] .e-form__indicators__indicator--state-completed .e-form__indicators__indicator__label{
	color: var(--hec-step-dark) !important;
}

/* Trait entre les étapes */
form[name="Demande de devis"] .e-form__indicators__indicator__separator{
	border-radius: 2px;
	background-color: var(--hec-muted) !important;
	transition: background-color 0.3s ease;
}

form[name="Demande de devis"] .e-form__indicators__indicator--state-completed + .e-form__indicators__indicator__separator{
	background-color: var(--hec-step) !important;
}

/* --------------------------------------------------------------------------
   Boutons radio et cases à cocher
   -------------------------------------------------------------------------- */

form[name="Demande de devis"] .elementor-field-subgroup{
	display: flex;
	flex-wrap: wrap;
	gap: 10px 12px;
}

/* Chaque choix devient une pastille cliquable */
form[name="Demande de devis"] .elementor-field-subgroup .elementor-field-option{
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 10px 16px 10px 14px;
	border: 1.5px solid var(--hec-border);
	border-radius: 10px;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

form[name="Demande de devis"] .elementor-field-subgroup .elementor-field-option:hover{
	border-color: var(--hec-primary);
	background: var(--hec-primary-soft);
}

form[name="Demande de devis"] .elementor-field-subgroup .elementor-field-option:has(input:checked){
	border-color: var(--hec-primary);
	background: var(--hec-primary-soft);
	box-shadow: 0 0 0 3px var(--hec-primary-ring);
}

form[name="Demande de devis"] .elementor-field-subgroup .elementor-field-option:has(input:focus-visible){
	outline: 2px solid var(--hec-primary);
	outline-offset: 2px;
}

/* Le libellé couvre toute la pastille : un clic n'importe où coche le choix */
form[name="Demande de devis"] .elementor-field-subgroup .elementor-field-option label{
	margin: 0;
	color: var(--hec-text);
	line-height: 1.3;
	cursor: pointer;
}

form[name="Demande de devis"] .elementor-field-subgroup .elementor-field-option label::after{
	content: "";
	position: absolute;
	inset: 0;
}

form[name="Demande de devis"] .elementor-field-subgroup input[type="radio"],
form[name="Demande de devis"] .elementor-field-subgroup input[type="checkbox"]{
	-webkit-appearance: none;
	appearance: none;
	flex: none;
	box-sizing: border-box;
	width: 20px;
	height: 20px;
	margin: 0;
	border: 2px solid var(--hec-border-strong);
	background-color: #fff;
	transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

form[name="Demande de devis"] .elementor-field-subgroup input[type="radio"]{
	border-radius: 50%;
}

form[name="Demande de devis"] .elementor-field-subgroup input[type="checkbox"]{
	border-radius: 6px;
}

form[name="Demande de devis"] .elementor-field-subgroup input[type="radio"]:checked{
	border-color: var(--hec-primary);
	background-color: var(--hec-primary);
	box-shadow: inset 0 0 0 3.5px #fff;
}

form[name="Demande de devis"] .elementor-field-subgroup input[type="checkbox"]:checked{
	border-color: var(--hec-primary);
	background-color: var(--hec-primary);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.4 6.4l2.5 2.5 4.7-5.6' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-position: center;
	background-repeat: no-repeat;
	background-size: 12px;
}

/* --------------------------------------------------------------------------
   Infobulle sur le libellé "Salle"
   -------------------------------------------------------------------------- */

.hec-info{
	position: relative;
	display: inline-flex;
	align-items: center;
	margin-left: 0.5em;
	border-radius: 50%;
	color: var(--hec-primary, #014b77);
	font-weight: 400;
	line-height: 1;
	letter-spacing: 0;
	text-align: left;
	text-transform: none;
	vertical-align: middle;
	cursor: help;
}

.hec-info:focus-visible{
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.hec-info svg{
	display: block;
	width: 18px;
	height: 18px;
	transition: transform 0.2s ease;
}

.hec-info:hover svg,
.hec-info:focus-visible svg{
	transform: scale(1.12);
}

.hec-info__bulle{
	position: absolute;
	z-index: 20;
	top: calc(100% + 10px);
	left: -10px;
	width: max-content;
	padding: 12px 16px;
	border-radius: 10px;
	background: #14293a;
	box-shadow: 0 8px 24px rgba(20, 41, 58, 0.28);
	color: #fff;
	font-size: 13.5px;
	line-height: 1.4;
	white-space: nowrap;
	visibility: hidden;
	opacity: 0;
	transform: translateY(-4px);
	transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
	pointer-events: none;
}

/* Petite flèche vers l'icône */
.hec-info__bulle::before{
	content: "";
	position: absolute;
	top: -5px;
	left: 14px;
	width: 10px;
	height: 10px;
	border-radius: 2px;
	background: #14293a;
	transform: rotate(45deg);
}

.hec-info__bulle span{
	display: block;
}

.hec-info__bulle span + span{
	margin-top: 6px;
}

.hec-info:hover .hec-info__bulle,
.hec-info:focus .hec-info__bulle,
.hec-info:focus-within .hec-info__bulle{
	visibility: visible;
	opacity: 1;
	transform: none;
}

/* Petits écrans : l'infobulle prend la largeur du libellé et passe à la ligne */
@media (max-width: 640px){
	form[name="Demande de devis"] .elementor-field-group-field_63d32df .elementor-field-label{
		position: relative;
	}

	.hec-info{
		position: static;
	}

	.hec-info__bulle{
		top: calc(100% + 8px);
		right: 0;
		left: 0;
		width: auto;
		white-space: normal;
	}

	.hec-info__bulle::before{
		display: none;
	}
}

/* --------------------------------------------------------------------------
   Changement d'étape : fondu à l'apparition
   -------------------------------------------------------------------------- */

@keyframes hec-etape{
	from{
		opacity: 0;
		transform: translateY(8px);
	}
	to{
		opacity: 1;
		transform: none;
	}
}

form[name="Demande de devis"] .e-form__step:not(.elementor-hidden){
	animation: hec-etape 0.4s ease both;
}

@media (prefers-reduced-motion: reduce){
	form[name="Demande de devis"] .e-form__step:not(.elementor-hidden){
		animation: none;
	}
}

/* --------------------------------------------------------------------------
   Calendrier (flatpickr) du champ Date
   La classe .hec-calendrier est posée par le script sur le calendrier.
   -------------------------------------------------------------------------- */

.flatpickr-calendar.hec-calendrier{
	--hec-cal: #014b77;
	--hec-cal-soft: rgba(1, 75, 119, 0.09);
	box-sizing: border-box !important;
	width: min(322px, calc(100vw - 16px)) !important;
	padding: 12px 12px 10px !important;
	border: 1px solid #e3e8ee;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 14px 36px rgba(20, 41, 58, 0.18);
	color: #3b434c;
	font-family: inherit;
	font-size: 14px;
	line-height: 1.2;
}

.flatpickr-calendar.hec-calendrier *{
	box-sizing: border-box;
}

/* Pas de flèche au-dessus du calendrier */
.flatpickr-calendar.hec-calendrier::before,
.flatpickr-calendar.hec-calendrier::after{
	display: none !important;
}

/* En-tête : flèche, mois + année, flèche */
.hec-calendrier .flatpickr-months{
	display: flex;
	align-items: center;
	height: 40px;
	margin-bottom: 6px;
}

.hec-calendrier .flatpickr-months .flatpickr-month{
	flex: 1;
	height: 40px;
	overflow: visible;
	background: none;
	color: inherit;
	fill: currentColor;
}

.hec-calendrier .flatpickr-current-month{
	position: static;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 2px;
	width: auto;
	height: 40px;
	padding: 0;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
}

.hec-calendrier .flatpickr-months .flatpickr-prev-month,
.hec-calendrier .flatpickr-months .flatpickr-next-month{
	position: static;
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border-radius: 8px;
	color: #3b434c;
	fill: currentColor;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.hec-calendrier .flatpickr-months .flatpickr-prev-month:hover,
.hec-calendrier .flatpickr-months .flatpickr-next-month:hover{
	background: var(--hec-cal-soft);
	color: var(--hec-cal);
}

.hec-calendrier .flatpickr-months .flatpickr-prev-month svg,
.hec-calendrier .flatpickr-months .flatpickr-next-month svg{
	width: 13px;
	height: 13px;
	fill: currentColor;
}

.hec-calendrier .flatpickr-months .flatpickr-prev-month:hover svg,
.hec-calendrier .flatpickr-months .flatpickr-next-month:hover svg{
	fill: currentColor;
}

.hec-calendrier .flatpickr-months .flatpickr-disabled{
	display: flex !important;
	visibility: hidden;
}

/* Mois et année : on neutralise les styles de champs du thème */
.hec-calendrier .flatpickr-current-month .flatpickr-monthDropdown-months,
.hec-calendrier .flatpickr-current-month input.cur-year{
	height: 32px !important;
	min-height: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 6px !important;
	background-color: transparent !important;
	box-shadow: none !important;
	color: inherit !important;
	font-family: inherit !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	line-height: 32px !important;
	outline: 0;
}

.hec-calendrier .flatpickr-current-month .flatpickr-monthDropdown-months{
	display: inline-block !important;
	width: auto !important;
	padding: 0 4px !important;
	cursor: pointer;
}

.hec-calendrier .flatpickr-current-month .flatpickr-monthDropdown-months:hover,
.hec-calendrier .flatpickr-current-month .numInputWrapper:hover{
	background: var(--hec-cal-soft);
}

.hec-calendrier .flatpickr-current-month .numInputWrapper{
	display: inline-block;
	width: 66px;
	height: 32px;
	border-radius: 6px;
}

.hec-calendrier .flatpickr-current-month input.cur-year{
	display: inline-block !important;
	width: 100% !important;
	padding: 0 0 0 6px !important;
	-moz-appearance: textfield;
	appearance: textfield;
}

/* Jours de la semaine */
.hec-calendrier .flatpickr-innerContainer,
.hec-calendrier .flatpickr-rContainer{
	display: block;
	width: 100%;
}

.hec-calendrier .flatpickr-weekdays{
	display: flex;
	align-items: center;
	width: 100%;
	height: 28px;
	background: none;
}

.hec-calendrier .flatpickr-weekdaycontainer{
	display: flex;
	flex: 1;
	width: 100%;
}

.hec-calendrier span.flatpickr-weekday{
	flex: 1;
	margin: 0;
	background: none;
	color: #8a929b;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	text-align: center;
}

/* Grille des jours : 7 colonnes qui tiennent toujours dans le calendrier */
.hec-calendrier .flatpickr-days{
	width: 100% !important;
	border: 0;
}

.hec-calendrier .dayContainer{
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-start;
	row-gap: 2px;
	width: 100% !important;
	min-width: 0 !important;
	max-width: none !important;
	padding: 0;
}

.hec-calendrier .flatpickr-day{
	flex: 0 0 14.2857%;
	width: 14.2857%;
	max-width: 14.2857% !important;
	height: 38px;
	margin: 0;
	border: 1px solid transparent;
	border-radius: 8px;
	color: #3b434c;
	font-weight: 400;
	line-height: 36px;
	text-align: center;
	cursor: pointer;
	transition: background-color 0.12s ease, color 0.12s ease;
}

.hec-calendrier .flatpickr-day:hover,
.hec-calendrier .flatpickr-day:focus{
	border-color: transparent;
	background: var(--hec-cal-soft);
}

.hec-calendrier .flatpickr-day.today{
	border-color: var(--hec-cal);
}

.hec-calendrier .flatpickr-day.prevMonthDay,
.hec-calendrier .flatpickr-day.nextMonthDay{
	color: #c3c9d0;
}

.hec-calendrier .flatpickr-day.flatpickr-disabled,
.hec-calendrier .flatpickr-day.flatpickr-disabled:hover{
	background: none;
	color: #d5dade;
	cursor: not-allowed;
}

/* Plage sélectionnée */
.hec-calendrier .flatpickr-day.inRange,
.hec-calendrier .flatpickr-day.inRange:hover{
	border-color: transparent;
	border-radius: 0;
	background: var(--hec-cal-soft);
	box-shadow: none !important;
	color: #3b434c;
}

.hec-calendrier .flatpickr-day.selected,
.hec-calendrier .flatpickr-day.startRange,
.hec-calendrier .flatpickr-day.endRange,
.hec-calendrier .flatpickr-day.selected:hover,
.hec-calendrier .flatpickr-day.startRange:hover,
.hec-calendrier .flatpickr-day.endRange:hover{
	border-color: var(--hec-cal);
	background: var(--hec-cal);
	box-shadow: none !important;
	color: #fff;
	font-weight: 600;
}

.hec-calendrier .flatpickr-day.startRange{
	border-radius: 8px 0 0 8px;
}

.hec-calendrier .flatpickr-day.endRange{
	border-radius: 0 8px 8px 0;
}

.hec-calendrier .flatpickr-day.startRange.endRange,
.hec-calendrier .flatpickr-day.selected:not(.startRange):not(.endRange){
	border-radius: 8px;
}

/* --------------------------------------------------------------------------
   Messages après envoi (succès / erreur)
   -------------------------------------------------------------------------- */

form[name="Demande de devis"] .elementor-message{
	display: flex;
	align-items: flex-start;
	gap: 10px;
	box-sizing: border-box;
	width: 100%;
	margin: 18px 0 0;
	padding: 14px 16px;
	border: 1px solid transparent;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	animation: hec-etape 0.35s ease both;
}

/* Icône : remplace celle d'Elementor */
form[name="Demande de devis"] .elementor-message::before{
	content: "" !important;
	flex: none;
	width: 20px;
	height: 20px;
	margin: 0 !important;
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
}

form[name="Demande de devis"] .elementor-message.elementor-message-success{
	border-color: #bfe3ca;
	background-color: #edf8f0;
	color: #1c6b3a;
}

form[name="Demande de devis"] .elementor-message.elementor-message-success::before{
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='10' fill='%232e9e56'/%3E%3Cpath d='M5.8 10.4l2.8 2.8 5.6-6.2' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

form[name="Demande de devis"] .elementor-message.elementor-message-danger{
	border-color: #f3c6c6;
	background-color: #fdf0f0;
	color: #a4262c;
}

form[name="Demande de devis"] .elementor-message.elementor-message-danger::before{
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='10' fill='%23d13438'/%3E%3Crect x='9' y='4.6' width='2' height='7' rx='1' fill='%23fff'/%3E%3Ccircle cx='10' cy='14.4' r='1.25' fill='%23fff'/%3E%3C/svg%3E");
}

/* Erreur affichée sous un champ : simple texte rouge, sans encadré */
form[name="Demande de devis"] .elementor-message.elementor-help-inline{
	display: block;
	margin: 6px 0 0;
	padding: 0;
	border: 0;
	background: none;
	color: #c0282e;
	font-size: 13px;
	font-weight: 500;
	animation: none;
}

form[name="Demande de devis"] .elementor-message.elementor-help-inline::before{
	display: none;
}

form[name="Demande de devis"] .elementor-field-group.elementor-error .elementor-field-textual{
	border-color: #d13438;
}

@media (prefers-reduced-motion: reduce){
	form[name="Demande de devis"] .elementor-message{
		animation: none;
	}
}

/* ==========================================================================
   Bouton "retour en haut de page"
   ========================================================================== */

/* Les !important neutralisent les styles de boutons du thème et du kit Elementor */
button.hec-scroll-top{
	position: fixed;
	right: max(24px, env(safe-area-inset-right));
	bottom: max(24px, env(safe-area-inset-bottom));
	z-index: 999;
	display: flex !important;
	align-items: center;
	justify-content: center;
	box-sizing: border-box !important;
	width: 48px !important;
	min-width: 0 !important;
	height: 48px !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: #014b77 !important;
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 6px 18px rgba(3, 23, 67, 0.28) !important;
	color: #fff !important;
	font-size: 0 !important;
	line-height: 1 !important;
	cursor: pointer;
	visibility: hidden;
	opacity: 0;
	transform: translateY(12px);
	transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, background-color 0.2s ease;
}

button.hec-scroll-top svg{
	display: block !important;
	flex: none !important;
	width: 22px !important;
	height: 22px !important;
	margin: 0 !important;
	fill: none !important;
	stroke: #fff !important;
}

button.hec-scroll-top.hec-scroll-top--visible{
	visibility: visible;
	opacity: 1;
	transform: none;
}

button.hec-scroll-top:hover,
button.hec-scroll-top:focus{
	background: #0a6398 !important;
	color: #fff !important;
}

button.hec-scroll-top.hec-scroll-top--visible:hover{
	transform: translateY(-3px);
}

button.hec-scroll-top:focus-visible{
	outline: 2px solid #fff;
	outline-offset: 2px;
	box-shadow: 0 0 0 5px #014b77, 0 6px 18px rgba(3, 23, 67, 0.28) !important;
}

@media (max-width: 640px){
	button.hec-scroll-top{
		right: max(16px, env(safe-area-inset-right));
		bottom: max(16px, env(safe-area-inset-bottom));
		width: 44px !important;
		height: 44px !important;
	}
}

@media (prefers-reduced-motion: reduce){
	button.hec-scroll-top{
		transition: none;
	}
}
