/* ============================================================
   Avis du site - fenetre de depot d'avis
   Charte Mada Pro Connect : marine #001C34, accent #002E55,
   or #CB8918, fond clair #EDF2F8. Poppins pour les titres.
   ============================================================ */

.mada-as-voile {
	position: fixed;
	inset: 0;
	z-index: 99990;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(0, 28, 52, 0.62);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
	opacity: 0;
	transition: opacity 0.22s ease;
}

.mada-as-voile[hidden] {
	display: none;
}

.mada-as-voile.est-ouvert {
	opacity: 1;
}

.mada-as-boite {
	position: relative;
	width: 100%;
	max-width: 480px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	padding: 30px 30px 26px;
	background: #FFFFFF;
	border-radius: 14px;
	box-shadow: 0 24px 60px rgba(0, 28, 52, 0.28);
	transform: translateY(14px) scale(0.985);
	transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.mada-as-voile.est-ouvert .mada-as-boite {
	transform: translateY(0) scale(1);
}

.mada-as-boite:before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	border-radius: 14px 14px 0 0;
	background: linear-gradient(90deg, #001C34 0%, #002E55 55%, #CB8918 100%);
}

.mada-as-fermer {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #5B6878;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.18s ease, color 0.18s ease;
}

.mada-as-fermer:hover,
.mada-as-fermer:focus-visible {
	background: #EDF2F8;
	color: #001C34;
}

.mada-as-titre {
	margin: 0 30px 6px 0;
	font-family: "Poppins", Helvetica, Arial, sans-serif;
	font-size: 1.3rem;
	font-weight: 600;
	line-height: 1.25;
	color: #001C34;
}

.mada-as-intro {
	margin: 0 0 20px;
	font-size: 0.92rem;
	line-height: 1.5;
	color: #5B6878;
}

/* ---- etoiles ---- */

.mada-as-notes {
	margin: 0 0 18px;
	padding: 0;
	border: 0;
}

.mada-as-legende {
	padding: 0;
	margin-bottom: 7px;
	font-size: 0.82rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #35506B;
}

/* les etoiles sont ecrites de 5 a 1 dans le HTML : le survol d'une etoile
   colore donc toutes celles qui la suivent, c'est a dire celles de gauche */
.mada-as-etoiles {
	display: inline-flex;
	flex-direction: row-reverse;
	gap: 4px;
}

.mada-as-etoiles input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.mada-as-etoiles label {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	cursor: pointer;
	border-radius: 8px;
	transition: transform 0.14s ease, background 0.14s ease;
}

.mada-as-etoiles label:hover {
	background: #FBF6EC;
	transform: scale(1.06);
}

.mada-as-etoiles svg {
	width: 28px;
	height: 28px;
	fill: #D7DEE8;
	transition: fill 0.14s ease;
}

.mada-as-etoiles label:hover svg,
.mada-as-etoiles label:hover ~ label svg,
.mada-as-etoiles input:checked ~ label svg {
	fill: #CB8918;
}

.mada-as-etoiles input:focus-visible + label {
	outline: 2px solid #002E55;
	outline-offset: 2px;
}

.mada-as-lu {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ---- champs ---- */

.mada-as-champ {
	margin: 0 0 16px;
}

.mada-as-champ label {
	display: block;
	margin-bottom: 5px;
	font-size: 0.82rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #35506B;
}

.mada-as-champ input[type="text"],
.mada-as-champ textarea {
	width: 100%;
	padding: 11px 13px;
	font-family: inherit;
	font-size: 0.95rem;
	color: #22324A;
	background: #FFFFFF;
	border: 1px solid #C9D4E2;
	border-radius: 9px;
	transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.mada-as-champ textarea {
	resize: vertical;
	min-height: 96px;
	line-height: 1.5;
}

.mada-as-champ input[type="text"]:focus,
.mada-as-champ textarea:focus {
	outline: 0;
	border-color: #002E55;
	box-shadow: 0 0 0 3px rgba(0, 46, 85, 0.12);
}

.mada-as-champ.est-fautif input[type="text"],
.mada-as-champ.est-fautif textarea {
	border-color: #B32D2E;
}

.mada-as-erreur {
	display: block;
	margin-top: 5px;
	font-size: 0.82rem;
	color: #8E2122;
}

.mada-as-piege {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---- boutons ---- */

.mada-as-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 20px 0 0;
}

.mada-as-envoyer {
	flex: 1 1 auto;
	min-height: 48px;
	padding: 0 24px;
	border: 0;
	border-radius: 999px;
	background: #001C34;
	color: #FFFFFF;
	font-family: "Poppins", Helvetica, Arial, sans-serif;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.18s ease;
}

.mada-as-envoyer:hover,
.mada-as-envoyer:focus-visible {
	background: #002E55;
}

.mada-as-envoyer[disabled] {
	opacity: 0.6;
	cursor: default;
}

.mada-as-plus-tard {
	min-height: 48px;
	padding: 0 16px;
	border: 0;
	background: transparent;
	color: #5B6878;
	font-size: 0.9rem;
	text-decoration: underline;
	cursor: pointer;
}

.mada-as-plus-tard:hover,
.mada-as-plus-tard:focus-visible {
	color: #001C34;
}

/* ---- message final ---- */

.mada-as-message {
	margin: 16px 0 0;
	padding: 12px 14px;
	border-radius: 9px;
	background: #EDF2F8;
	border-left: 4px solid #002E55;
	font-size: 0.92rem;
	color: #22324A;
}

.mada-as-message.est-fautif {
	background: #FDECEC;
	border-left-color: #B32D2E;
	color: #8E2122;
}

.mada-as-form.est-envoye .mada-as-notes,
.mada-as-form.est-envoye .mada-as-champ,
.mada-as-form.est-envoye .mada-as-actions {
	display: none;
}

/* ---- mobile ---- */

@media (max-width: 899px) {
	.mada-as-voile {
		padding: 12px;
		align-items: flex-end;
	}

	.mada-as-boite {
		padding: 26px 20px 22px;
		border-radius: 16px 16px 10px 10px;
	}

	.mada-as-titre {
		font-size: 1.15rem;
	}

	.mada-as-actions {
		flex-direction: column-reverse;
		align-items: stretch;
	}

	.mada-as-envoyer,
	.mada-as-plus-tard {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mada-as-voile,
	.mada-as-boite,
	.mada-as-etoiles label,
	.mada-as-etoiles svg {
		transition: none;
	}
}

/* ============================================================
   Boutons flottants, en bas a droite, sur toutes les pages
   ============================================================ */

.mada-flottants {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 99980;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
	pointer-events: none;
}

.mada-flottant {
	pointer-events: auto;
	display: inline-flex;
	align-items: center;
	gap: 9px;
	min-height: 46px;
	padding: 0 20px 0 16px;
	border: 0;
	border-radius: 999px;
	font-family: "Poppins", Helvetica, Arial, sans-serif;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	box-shadow: 0 10px 26px rgba(0, 28, 52, 0.26);
	transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.mada-flottant:hover,
.mada-flottant:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 14px 32px rgba(0, 28, 52, 0.32);
}

.mada-flottant-ico {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	flex: 0 0 auto;
}

.mada-flottant-ico svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

/* devis express : marine, le ton de la marque */
.mada-flottant-devis {
	background: #001C34;
	color: #FFFFFF;
}

.mada-flottant-devis:hover,
.mada-flottant-devis:focus-visible {
	background: #002E55;
	color: #FFFFFF;
}

/* donner mon avis : or, pour attirer l'oeil */
.mada-flottant-avis {
	background: #CB8918;
	color: #001C34;
}

.mada-flottant-avis:hover,
.mada-flottant-avis:focus-visible {
	background: #B8790F;
	color: #001C34;
}

/* la pulsation : un halo qui respire, visible sans etre agressif */
@keyframes mada-pulse {
	0% {
		box-shadow: 0 10px 26px rgba(0, 28, 52, 0.26), 0 0 0 0 rgba(203, 137, 24, 0.55);
	}
	70% {
		box-shadow: 0 10px 26px rgba(0, 28, 52, 0.26), 0 0 0 16px rgba(203, 137, 24, 0);
	}
	100% {
		box-shadow: 0 10px 26px rgba(0, 28, 52, 0.26), 0 0 0 0 rgba(203, 137, 24, 0);
	}
}

.mada-flottant.clignote {
	animation: mada-pulse 2.1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.mada-flottant.clignote:hover,
.mada-flottant.clignote:focus-visible {
	animation-play-state: paused;
}

/* la fenetre ouverte masque les boutons, pour ne pas se marcher dessus */
.mada-as-voile:not([hidden]) ~ .mada-flottants {
	opacity: 0;
	visibility: hidden;
}

@media (max-width: 899px) {
	.mada-flottants {
		right: 12px;
		bottom: 12px;
		gap: 8px;
	}

	.mada-flottant {
		min-height: 44px;
		padding: 0 16px 0 13px;
		font-size: 0.84rem;
	}

	.mada-flottant-ico svg {
		width: 18px;
		height: 18px;
	}
}

/* ecrans tres etroits : on garde l'icone seule pour ne rien recouvrir */
@media (max-width: 420px) {
	.mada-flottant-devis .mada-flottant-texte {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		padding: 0;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	.mada-flottant-devis {
		padding: 0;
		width: 46px;
		height: 46px;
		justify-content: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mada-flottant.clignote {
		animation: none;
	}

	.mada-flottant {
		transition: none;
	}
}

/* ============================================================
   Carrousel des avis
   Le defilement est natif (scroll-snap) : il fonctionne au doigt
   et a la molette meme sans JavaScript. Les fleches et les points
   ne font que piloter ce defilement.
   ============================================================ */

.mada-avis-carrousel {
	position: relative;
}

.mada-avis-piste {
	display: flex;
	gap: 24px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding: 4px 2px 6px;
	margin: 0 -2px;
}

.mada-avis-piste::-webkit-scrollbar {
	display: none;
}

.mada-avis-piste:focus-visible {
	outline: 2px solid #002E55;
	outline-offset: 4px;
	border-radius: 12px;
}

.mada-avis-piste > .mada-avis {
	flex: 0 0 calc((100% - 48px) / 3);
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
}

.mada-avis-piste > .mada-avis .mada-avis-texte {
	flex: 1 1 auto;
}

/* ---- fleches ---- */

.mada-avis-commandes {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-bottom: 12px;
}

.mada-avis-fleche {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid #C9D4E2;
	border-radius: 50%;
	background: #FFFFFF;
	color: #001C34;
	cursor: pointer;
	transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.mada-avis-fleche svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

.mada-avis-fleche:hover,
.mada-avis-fleche:focus-visible {
	background: #001C34;
	border-color: #001C34;
	color: #FFFFFF;
}

.mada-avis-fleche[disabled] {
	opacity: 0.35;
	cursor: default;
	background: #FFFFFF;
	border-color: #C9D4E2;
	color: #001C34;
}

.mada-avis-commandes[hidden] {
	display: none;
}

/* ---- points ---- */

.mada-avis-points {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 18px;
}

.mada-avis-point {
	width: 9px;
	height: 9px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #C9D4E2;
	cursor: pointer;
	transition: background 0.18s ease, width 0.18s ease;
}

.mada-avis-point:hover,
.mada-avis-point:focus-visible {
	background: #35506B;
}

.mada-avis-point.est-actif {
	width: 24px;
	border-radius: 999px;
	background: #CB8918;
}

.mada-avis-points[hidden] {
	display: none;
}

@media (max-width: 1024px) {
	.mada-avis-piste > .mada-avis {
		flex: 0 0 calc((100% - 24px) / 2);
	}
}

@media (max-width: 899px) {
	.mada-avis-piste {
		gap: 16px;
	}

	.mada-avis-piste > .mada-avis {
		flex: 0 0 86%;
	}

	.mada-avis-commandes {
		justify-content: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mada-avis-piste {
		scroll-behavior: auto;
	}

	.mada-avis-point,
	.mada-avis-fleche {
		transition: none;
	}
}

/* ============================================================
   1.35.4 - conformite a la charte
   Le theme impose une couleur a tous les boutons : ces regles
   reprennent la main, d'ou les !important, volontaires et limites
   aux seuls elements de ce module.
   ============================================================ */

/* ---- la fenetre ---- */

.mada-as-voile .mada-as-boite {
	background: #FFFFFF !important;
	border: 0 !important;
	border-radius: 14px !important;
}

.mada-as-voile .mada-as-fermer {
	background: transparent !important;
	border: 0 !important;
	border-radius: 50% !important;
	color: #5B6878 !important;
	box-shadow: none !important;
	text-decoration: none !important;
}

.mada-as-voile .mada-as-fermer:hover,
.mada-as-voile .mada-as-fermer:focus-visible {
	background: #EDF2F8 !important;
	color: #001C34 !important;
}

.mada-as-voile .mada-as-titre {
	color: #001C34 !important;
}

.mada-as-voile .mada-as-legende,
.mada-as-voile .mada-as-champ label {
	color: #35506B !important;
}

.mada-as-voile .mada-as-champ input[type="text"],
.mada-as-voile .mada-as-champ textarea {
	background: #FFFFFF !important;
	border: 1px solid #C9D4E2 !important;
	border-radius: 9px !important;
	color: #22324A !important;
	box-shadow: none !important;
}

.mada-as-voile .mada-as-champ input[type="text"]:focus,
.mada-as-voile .mada-as-champ textarea:focus {
	border-color: #002E55 !important;
	box-shadow: 0 0 0 3px rgba(0, 46, 85, 0.12) !important;
}

/* le bouton principal : marine, texte blanc */
.mada-as-voile button.mada-as-envoyer {
	background: #001C34 !important;
	background-image: none !important;
	border: 0 !important;
	border-radius: 999px !important;
	color: #FFFFFF !important;
	text-decoration: none !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	box-shadow: none !important;
}

.mada-as-voile button.mada-as-envoyer:hover,
.mada-as-voile button.mada-as-envoyer:focus-visible {
	background: #002E55 !important;
	color: #FFFFFF !important;
}

/* le lien secondaire : discret, pas un bouton */
.mada-as-voile button.mada-as-plus-tard {
	background: transparent !important;
	background-image: none !important;
	border: 0 !important;
	border-radius: 0 !important;
	color: #5B6878 !important;
	box-shadow: none !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
}

.mada-as-voile button.mada-as-plus-tard:hover,
.mada-as-voile button.mada-as-plus-tard:focus-visible {
	background: transparent !important;
	color: #001C34 !important;
}

/* les etoiles */
.mada-as-voile .mada-as-etoiles label {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
}

.mada-as-voile .mada-as-etoiles label:hover {
	background: #FBF6EC !important;
}

.mada-as-voile .mada-as-etoiles svg {
	fill: #D7DEE8 !important;
}

.mada-as-voile .mada-as-etoiles label:hover svg,
.mada-as-voile .mada-as-etoiles label:hover ~ label svg,
.mada-as-voile .mada-as-etoiles input:checked ~ label svg {
	fill: #CB8918 !important;
}

/* ---- les fleches du carrousel ---- */

.mada-avis-carrousel button.mada-avis-fleche {
	background: #FFFFFF !important;
	background-image: none !important;
	border: 1px solid #C9D4E2 !important;
	border-radius: 50% !important;
	color: #001C34 !important;
	box-shadow: none !important;
}

.mada-avis-carrousel button.mada-avis-fleche:hover:not([disabled]),
.mada-avis-carrousel button.mada-avis-fleche:focus-visible {
	background: #001C34 !important;
	border-color: #001C34 !important;
	color: #FFFFFF !important;
}

.mada-avis-points button.mada-avis-point {
	background: #C9D4E2 !important;
	background-image: none !important;
	border: 0 !important;
	box-shadow: none !important;
	border-radius: 50% !important;
}

.mada-avis-points button.mada-avis-point.est-actif {
	background: #CB8918 !important;
	border-radius: 999px !important;
}

/* ============================================================
   Boutons flottants : icone seule, le texte glisse au survol
   ============================================================ */

.mada-flottants .mada-flottant,
.mada-flottants a.mada-flottant,
.mada-flottants button.mada-flottant {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 0 !important;
	min-width: 52px !important;
	min-height: 52px !important;
	padding: 0 15px !important;
	border: 0 !important;
	border-radius: 999px !important;
	text-decoration: none !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	overflow: hidden !important;
	transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease !important;
}

.mada-flottants a.mada-flottant-devis {
	background: #001C34 !important;
	color: #FFFFFF !important;
}

.mada-flottants a.mada-flottant-devis:hover,
.mada-flottants a.mada-flottant-devis:focus-visible {
	background: #002E55 !important;
	color: #FFFFFF !important;
}

.mada-flottants button.mada-flottant-avis {
	background: #CB8918 !important;
	background-image: none !important;
	color: #001C34 !important;
}

.mada-flottants button.mada-flottant-avis:hover,
.mada-flottants button.mada-flottant-avis:focus-visible {
	background: #B8790F !important;
	color: #001C34 !important;
}

.mada-flottants .mada-flottant-ico svg {
	fill: currentColor !important;
}

/* le texte est replie, et se deploie de la droite vers la gauche */
.mada-flottants .mada-flottant-texte {
	display: inline-block;
	max-width: 0;
	margin-left: 0;
	opacity: 0;
	overflow: hidden;
	white-space: nowrap;
	transform: translateX(12px);
	transition: max-width 0.32s cubic-bezier(0.2, 0.8, 0.3, 1), margin-left 0.32s cubic-bezier(0.2, 0.8, 0.3, 1), opacity 0.2s ease 0.06s, transform 0.32s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.mada-flottants .mada-flottant:hover .mada-flottant-texte,
.mada-flottants .mada-flottant:focus-visible .mada-flottant-texte,
.mada-flottants .mada-flottant:focus-within .mada-flottant-texte {
	max-width: 260px;
	margin-left: 10px;
	opacity: 1;
	transform: translateX(0);
}

/* au survol le bouton se souleve, comme les cartes du site */
.mada-flottants .mada-flottant:hover,
.mada-flottants .mada-flottant:focus-visible {
	transform: translateY(-2px) !important;
}

/* sur petit ecran, l'icone seule suffit : on annule l'exception precedente */
@media (max-width: 420px) {
	.mada-flottants a.mada-flottant-devis {
		width: auto;
		height: auto;
	}

	.mada-flottant-devis .mada-flottant-texte {
		position: static;
		width: auto;
		height: auto;
		margin: 0;
		clip: auto;
		overflow: hidden;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mada-flottants .mada-flottant-texte {
		transition: none;
	}
}
