/**
 * Styles front-end du bandeau contact sticky électricien
 * Design moderne, réactif et optimisé pour le taux de conversion (CRO / UX)
 */

:root {
	--sce-bg-color: #0d3b66;
	--sce-text-color: #ffffff;
	--sce-btn-phone-bg: #f4d35e;
	--sce-btn-phone-text: #0d3b66;
	--sce-btn-contact-bg: #ffffff;
	--sce-btn-contact-text: #0d3b66;
	--sce-transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
	--sce-shadow: 0 -6px 25px rgba(0, 0, 0, 0.18), 0 -1px 2px rgba(255, 255, 255, 0.08);
}

/* Conteneur principal fixé en bas de l'écran */
.sce-sticky-bar {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	z-index: 9999;
	background-color: var(--sce-bg-color);
	color: var(--sce-text-color);
	box-shadow: var(--sce-shadow);
	border-top: 2px solid rgba(244, 211, 94, 0.5); /* Liseré lumineux jaune électrique */
	padding-top: 10px;
	padding-bottom: max(10px, env(safe-area-inset-bottom));
	animation: sceSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
	box-sizing: border-box;
}

@keyframes sceSlideUp {
	from {
		transform: translateY(100%);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

/* Alignement et conteneur central Flexbox */
.sce-container {
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	box-sizing: border-box;
}

/* Zone d'accroche gauche */
.sce-catchphrase {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1 1 auto;
	min-width: 0;
}

/* Indicateur lumineux d'urgence/disponibilité */
.sce-pulse-indicator {
	width: 10px;
	height: 10px;
	background-color: #2ec4b6;
	border-radius: 50%;
	display: inline-block;
	flex-shrink: 0;
	box-shadow: 0 0 0 rgba(46, 196, 182, 0.6);
	animation: scePulse 2s infinite;
}

@keyframes scePulse {
	0% {
		box-shadow: 0 0 0 0 rgba(46, 196, 182, 0.7);
	}
	70% {
		box-shadow: 0 0 0 8px rgba(46, 196, 182, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(46, 196, 182, 0);
	}
}

.sce-catchphrase-text {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--sce-text-color);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Groupe des deux boutons Call-To-Action */
.sce-actions-group {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-shrink: 0;
}

/* Style des boutons (Égale importance visuelle) */
.sce-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 44px;
	padding: 10px 22px;
	border-radius: 50px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 14.5px;
	font-weight: 700;
	text-decoration: none !important;
	letter-spacing: 0.2px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	transition: var(--sce-transition);
	cursor: pointer;
	white-space: nowrap;
	border: 1px solid transparent;
	outline: none;
	box-sizing: border-box;
}

/* Bouton 1 : Téléphone */
.sce-btn-phone {
	background-color: var(--sce-btn-phone-bg);
	color: var(--sce-btn-phone-text) !important;
}

.sce-btn-phone:hover,
.sce-btn-phone:focus {
	background-color: #ffd166;
	transform: translateY(-2px);
	box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
}

/* Bouton 2 : Contact / Devis */
.sce-btn-contact {
	background-color: var(--sce-btn-contact-bg);
	color: var(--sce-btn-contact-text) !important;
}

.sce-btn-contact:hover,
.sce-btn-contact:focus {
	background-color: #f0f4f8;
	transform: translateY(-2px);
	box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
}

.sce-btn:active {
	transform: translateY(0);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Accessibilité Clavier (WCAG) */
.sce-btn:focus-visible {
	outline: 3px solid #ffb703;
	outline-offset: 2px;
}

/* Icônes SVG */
.sce-icon {
	flex-shrink: 0;
	transition: transform 0.2s ease;
}

.sce-btn:hover .sce-icon {
	transform: scale(1.1);
}

/* -------------------------------------------------------------
 * RESPONSIVE DESIGN & ERGONOMIE MOBILE
 * ------------------------------------------------------------- */

/* Tablette moyenne / petits écrans (max 991px) */
@media screen and (max-width: 991px) {
	.sce-catchphrase-text {
		font-size: 14px;
	}
	.sce-btn {
		padding: 9px 18px;
		font-size: 14px;
	}
}

/* Écrans mobiles (max 768px) : adaptation tactile optimale */
@media screen and (max-width: 768px) {
	.sce-sticky-bar {
		padding-top: 8px;
		padding-bottom: max(10px, env(safe-area-inset-bottom));
	}

	.sce-container {
		flex-direction: column;
		gap: 8px;
		padding: 0 12px;
	}

	.sce-catchphrase {
		width: 100%;
		justify-content: center;
	}

	.sce-catchphrase-text {
		font-size: 12.5px;
		text-align: center;
		white-space: normal;
	}

	.sce-actions-group {
		width: 100%;
		display: flex;
		flex-direction: row; /* Boutons côte-à-côte à 50% de largeur */
		gap: 8px;
	}

	.sce-btn {
		flex: 1 1 50%;
		min-height: 48px; /* Standard tactile recommandation Google & Apple */
		padding: 8px 12px;
		font-size: 13.5px;
		border-radius: 8px; /* Forme rectangulaire douce sur mobile pour meilleure ergonomie */
		justify-content: center;
	}
}

/* Très petits smartphones (max 380px) : empilement vertical fluide */
@media screen and (max-width: 380px) {
	.sce-catchphrase {
		display: none; /* Allège l'écran pour laisser place nette aux actions prioritaires */
	}

	.sce-actions-group {
		flex-direction: column;
		gap: 6px;
	}

	.sce-btn {
		width: 100%;
		flex: 1 1 100%;
		min-height: 44px;
	}
}
