/* CodFlow Vacation Mode — front-end
   Propriétés logiques (inline-start/end) partout : fonctionne en RTL (arabe)
   comme en LTR sans feuille de style séparée. */

:root {
	--cfvm-accent: #d2884a;
	--cfvm-accent-rgb: 210, 136, 74;
	--cfvm-ink: #1f2937;
	--cfvm-ink-soft: #4b5563;
}

@keyframes cfvm-ring {
	0%   { transform: scale(.55); opacity: .85; }
	100% { transform: scale(1.8);  opacity: 0; }
}
@keyframes cfvm-blink {
	0%, 46%   { opacity: 1; }
	50%, 96%  { opacity: .12; }
	100%      { opacity: 1; }
}
@keyframes cfvm-sheen {
	0%        { transform: translateX(-130%); }
	55%, 100% { transform: translateX(130%); }
}
/* IMPORTANT : cette animation ne touche PAS l'opacité.
   Sur certains thèmes/navigateurs la timeline d'animation peut rester bloquée
   à t=0 (onglet non peint, content-visibility, throttling…). Si l'opacité était
   animée avec fill-mode "both", le bandeau et le calque resteraient invisibles
   alors que les commandes sont bloquées côté serveur — le pire des cas : le
   client ne comprend pas pourquoi sa commande échoue.
   La visibilité ne doit donc JAMAIS dépendre d'une animation. */
@keyframes cfvm-rise {
	from { transform: translateY(12px); }
	to   { transform: none; }
}
@keyframes cfvm-float {
	0%, 100% { transform: translateY(0); }
	50%      { transform: translateY(-4px); }
}

/* ---------------------------------------------------------------- Bandeau */

/* Bande pleine largeur insérée juste après le <header> (voir cfvm-front.js).
   Volontairement en dehors de toute grille/conteneur du thème : c'est ce qui
   garantit qu'elle ne peut plus être écrasée par une mise en page en colonnes. */
.cfvm-banner-strip {
	position: relative;
	z-index: 9000;
	width: 100%;
	box-sizing: border-box;
	padding: 14px clamp(14px, 4vw, 40px);
	background: #fff;
	border-bottom: 1px solid rgba(var(--cfvm-accent-rgb), .18);
}
.cfvm-banner-strip .cfvm-banner {
	max-width: 1200px;
	margin: 0 auto;
}

.cfvm-banner {
	position: relative;
	display: flex;
	gap: 16px;
	align-items: flex-start;
	margin: 0 0 26px;
	padding: 20px 22px;
	border: 1px solid rgba(var(--cfvm-accent-rgb), .30);
	border-radius: 18px;
	background:
		linear-gradient(135deg,
			rgba(var(--cfvm-accent-rgb), .14) 0%,
			rgba(var(--cfvm-accent-rgb), .05) 55%,
			rgba(255, 255, 255, .65) 100%),
		#fff;
	box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
	overflow: hidden;
	opacity: 1; /* garanti visible, quoi qu'il arrive à l'animation */
	animation: cfvm-rise .5s ease both;
}

/* reflet qui balaie le bandeau */
.cfvm-banner::after {
	content: '';
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, .45) 50%, transparent 68%);
	transform: translateX(-130%);
	animation: cfvm-sheen 4.4s ease-in-out infinite;
}

/* pastille qui pulse */
.cfvm-banner__pulse {
	position: relative;
	flex: 0 0 auto;
	width: 14px;
	height: 14px;
	margin-top: 7px;
}
.cfvm-dot {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: var(--cfvm-accent);
	box-shadow: 0 0 0 3px rgba(var(--cfvm-accent-rgb), .18);
}
.cfvm-banner__pulse::before,
.cfvm-banner__pulse::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 50%;
	border: 2px solid var(--cfvm-accent);
	animation: cfvm-ring 2s ease-out infinite;
}
.cfvm-banner__pulse::after { animation-delay: 1s; }

.cfvm-banner__body { flex: 1 1 auto; min-width: 0; position: relative; z-index: 1; }

.cfvm-banner__head {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 8px;
}

.cfvm-banner__title {
	margin: 0;
	font-size: 1.06rem;
	font-weight: 800;
	line-height: 1.5;
	color: var(--cfvm-ink);
}
.cfvm-banner__msg {
	margin: 0 0 6px;
	font-size: .94rem;
	line-height: 1.8;
	color: var(--cfvm-ink-soft);
}
.cfvm-banner__note {
	margin: 0;
	font-size: .9rem;
	font-weight: 700;
	color: var(--cfvm-accent);
}

/* badge « متوقف مؤقتًا » avec point clignotant */
.cfvm-chip {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--cfvm-accent);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.7;
	white-space: nowrap;
	box-shadow: 0 4px 12px rgba(var(--cfvm-accent-rgb), .35);
}
.cfvm-chip__dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #fff;
	animation: cfvm-blink 1.25s steps(1, end) infinite;
}

/* --------------------------------------------- Calque sur le formulaire */

.cfvm-locked { position: relative !important; }

/* le contenu réel du formulaire est estompé et rendu inerte */
.cfvm-locked > *:not(.cfvm-lock) {
	filter: saturate(.5) opacity(.5);
	pointer-events: none !important;
	user-select: none;
}

.cfvm-lock {
	position: absolute;
	inset: 0;
	z-index: 9999;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	padding: 22px 16px;
	border-radius: inherit;
	background: rgba(255, 255, 255, .55);
	-webkit-backdrop-filter: blur(7px) saturate(1.15);
	backdrop-filter: blur(7px) saturate(1.15);
	opacity: 1; /* garanti visible, quoi qu'il arrive à l'animation */
	animation: cfvm-rise .45s ease both;
}

/* la carte reste visible même si le formulaire est très haut */
.cfvm-lock__card {
	position: sticky;
	top: 26px;
	width: min(430px, 100%);
	text-align: center;
	background: #fff;
	border: 1px solid rgba(var(--cfvm-accent-rgb), .28);
	border-radius: 20px;
	padding: 26px 22px 24px;
	box-shadow: 0 26px 64px rgba(15, 23, 42, .20);
}

.cfvm-lock__badge {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	margin-bottom: 14px;
	border-radius: 50%;
	background: rgba(var(--cfvm-accent-rgb), .12);
	color: var(--cfvm-accent);
	animation: cfvm-float 3.2s ease-in-out infinite;
}
.cfvm-lock__badge::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 50%;
	border: 2px solid var(--cfvm-accent);
	animation: cfvm-ring 2.2s ease-out infinite;
}
.cfvm-lock__icon { display: inline-flex; }

.cfvm-lock__chip { margin-bottom: 12px; }

.cfvm-lock__title {
	margin: 0 0 10px;
	font-size: 1.08rem;
	font-weight: 800;
	line-height: 1.55;
	color: var(--cfvm-ink);
}
.cfvm-lock__msg {
	margin: 0 0 10px;
	font-size: .93rem;
	line-height: 1.85;
	color: var(--cfvm-ink-soft);
}
.cfvm-lock__note {
	margin: 0;
	padding-top: 12px;
	border-top: 1px dashed rgba(var(--cfvm-accent-rgb), .35);
	font-size: .9rem;
	font-weight: 700;
	color: var(--cfvm-accent);
}

/* ------------------------------------------------------------------ Toast */

.cfvm-toast {
	position: fixed;
	inset-inline: 16px;
	bottom: 22px;
	z-index: 100000;
	display: flex;
	gap: 12px;
	align-items: flex-start;
	width: min(430px, calc(100% - 32px));
	margin-inline: auto;
	padding: 15px 17px;
	border-radius: 15px;
	background: #111827;
	color: #fff;
	font-size: .92rem;
	line-height: 1.7;
	box-shadow: 0 22px 52px rgba(0, 0, 0, .30);
	opacity: 0;
	transform: translateY(16px);
	transition: opacity .28s ease, transform .28s ease;
}
.cfvm-toast.is-in { opacity: 1; transform: none; }
.cfvm-toast__dot {
	flex: 0 0 auto;
	width: 9px;
	height: 9px;
	margin-top: 8px;
	border-radius: 50%;
	background: var(--cfvm-accent);
	animation: cfvm-blink 1.25s steps(1, end) infinite;
}
.cfvm-toast__title { display: block; font-weight: 800; margin-bottom: 2px; }

/* ------------------------------------------------------------ Responsive */

@media (max-width: 600px) {
	.cfvm-banner { padding: 16px 15px; gap: 12px; border-radius: 15px; }
	.cfvm-banner__title { font-size: 1rem; }
	.cfvm-banner__msg { font-size: .9rem; }
	.cfvm-lock { padding: 16px 12px; }
	.cfvm-lock__card { padding: 22px 17px 20px; border-radius: 17px; }
}

/* -------------------------------------------- Accessibilité / animations */

@media (prefers-reduced-motion: reduce) {
	.cfvm-banner,
	.cfvm-banner::after,
	.cfvm-banner__pulse::before,
	.cfvm-banner__pulse::after,
	.cfvm-chip__dot,
	.cfvm-lock,
	.cfvm-lock__badge,
	.cfvm-lock__badge::before,
	.cfvm-toast__dot {
		animation: none !important;
	}
	.cfvm-toast { transition: none; }
}
