/*
 * Decor drawn in CSS instead of images placed in Elementor (19/11/2026): the corner circles of the
 * "La CPTS Sénart en chiffres" cards and of the pink and violet boxes, the circle of the team section
 * template on tablets, and the hero dots. An image left a white card until it loaded and cost a request.
 *
 * Each motif is one class set on the Elementor container (Advanced > CSS classes). The shapes keep the
 * geometry measured in the former images: they are radial gradients laid out in a box with the image's
 * aspect ratio, so they scale like the image did. Nothing here is content, so nothing is announced.
 */

/* ---------- Corner circles: cards and boxes ----------
   The images were drawn with background-size: cover, so the box keeps the image ratio and covers the
   container: Chrome, Firefox and Safari carry min-width / min-height through aspect-ratio, which gives
   the larger of the two scales, like cover. The circles sit under the content (isolation + z-index -1)
   and are clipped by the container's rounded corners (overflow: clip). */
.e-con:is(.cpts-deco-carte-violet, .cpts-deco-carte-framboise, .cpts-deco-carte-bleu, .cpts-deco-encart-framboise, .cpts-deco-encart-violet) {
	isolation: isolate;
	overflow: clip;
	background-color: var(--cpts-deco-fond);
}

.e-con:is(.cpts-deco-carte-violet, .cpts-deco-carte-framboise, .cpts-deco-carte-bleu, .cpts-deco-encart-framboise, .cpts-deco-encart-violet)::after {
	content: "";
	position: absolute;
	z-index: -1;
	top: var(--cpts-deco-haut, 0);
	right: 0;
	translate: 0 var(--cpts-deco-decalage, 0);
	width: var(--cpts-deco-largeur, auto);
	min-width: var(--cpts-deco-min, 100%);
	min-height: var(--cpts-deco-min, 100%);
	aspect-ratio: var(--cpts-deco-ratio);
	background: var(--cpts-deco-cercles);
	pointer-events: none;
}

/* Cards (fond-violet / -framboise / -bleu.png, 450 x 246, centre right): a ring and a disc. */
.e-con:is(.cpts-deco-carte-violet, .cpts-deco-carte-framboise, .cpts-deco-carte-bleu) {
	--cpts-deco-ratio: 450 / 246;
	--cpts-deco-haut: 50%;
	--cpts-deco-decalage: -50%;
	--cpts-deco-cercles:
		radial-gradient(ellipse 15.422% 28.211% at 94.578% 11.179%, var(--cpts-deco-coeur) calc(100% - 0.5px), transparent calc(100% + 0.5px)),
		radial-gradient(ellipse 16.7% 30.549% at 94.022% 11.728%, var(--cpts-deco-cercle) calc(100% - 0.5px), transparent calc(100% + 0.5px));
}

.e-con.cpts-deco-carte-violet {
	--cpts-deco-fond: #f5e7f7;
	--cpts-deco-cercle: #e5beea;
	--cpts-deco-coeur: #d89ddf;
}

.e-con.cpts-deco-carte-framboise {
	--cpts-deco-fond: #fbe6ee;
	--cpts-deco-cercle: #f6c6d8;
	--cpts-deco-coeur: #f2abc6;
}

.e-con.cpts-deco-carte-bleu {
	--cpts-deco-fond: #e3f7fc;
	--cpts-deco-cercle: #bbe8f3;
	--cpts-deco-coeur: #9adbeb;
}

/* Pink box (fond-framboise-grand.png, 1725 x 570, top right). */
.e-con.cpts-deco-encart-framboise {
	--cpts-deco-ratio: 1725 / 570;
	--cpts-deco-fond: #fbe6ee;
	--cpts-deco-cercles:
		radial-gradient(ellipse 6.054% 18.321% at 97.874% 7.188%, #f2abc6 calc(100% - 0.5px), transparent calc(100% + 0.5px)),
		radial-gradient(ellipse 9.395% 28.432% at 95.919% 5.784%, #f6c6d8 calc(100% - 0.5px), transparent calc(100% + 0.5px));
}

/* Violet box (fond-violet-grand.png, 1725 x 537, top right). */
.e-con.cpts-deco-encart-violet {
	--cpts-deco-ratio: 1725 / 537;
	--cpts-deco-fond: #f5e7f7;
	--cpts-deco-cercles:
		radial-gradient(ellipse 6.023% 19.346% at 97.929% 7.726%, #d89ddf calc(100% - 0.5px), transparent calc(100% + 0.5px)),
		radial-gradient(ellipse 6.522% 20.95% at 97.652% 8.104%, #e5beea calc(100% - 0.5px), transparent calc(100% + 0.5px));
}

/* Phones: the pink box drew its image 560 px wide (V1-14), circles in the corner above the title. */
@media (max-width: 767px) {
	.e-con.cpts-deco-encart-framboise {
		--cpts-deco-largeur: 560px;
		--cpts-deco-min: 0;
	}
}

/* ---------- Team section template: white, a pale blue circle on tablets ----------
   fond-blanc-rond-bleu.jpg (768 x 1237, cover, centre right) on tablets, fond-blanc.jpg on phones.
   The desktop arc image stays an Elementor background; Elementor would carry it down to tablets and
   phones once their own images are gone, and its per-element rule outranks any class, hence !important. */
@media (max-width: 1024px) {
	.e-con.cpts-deco-rond-bleu {
		isolation: isolate;
		overflow: clip;
		background-color: #fff;
		background-image: none !important;
	}

	.e-con.cpts-deco-rond-bleu::after {
		content: "";
		position: absolute;
		z-index: -1;
		top: 50%;
		right: 0;
		translate: 0 -50%;
		min-width: 100%;
		min-height: 100%;
		aspect-ratio: 768 / 1237;
		background:
			radial-gradient(ellipse 27.5% 17.074% at 111.862% 100.768%, transparent calc(99.763% - 0.5px), rgb(119 167 177) 99.763% 100.237%, transparent calc(100.237% + 0.5px)),
			radial-gradient(ellipse 17.122% 10.631% at 104.232% 97.179%, #a6ebfa calc(100% - 0.5px), transparent calc(100% + 0.5px));
		pointer-events: none;
	}
}

@media (max-width: 767px) {
	.e-con.cpts-deco-rond-bleu::after {
		content: none;
	}
}

/* ---------- Hero dots ----------
   Blue and raspberry discs with white rings and their soft shadow, drawn on the hero container where
   the image widget sat, in the same place: same containing block, width, top or bottom offset and
   z-index (1, like Elementor's absolute widgets). Hidden on phones, where they covered the title.
   Pages whose dots sat elsewhere set the variables in the container's custom CSS. */
.e-con:is(.cpts-deco-pastilles, .cpts-deco-pastilles-interieur)::after {
	content: "";
	position: absolute;
	z-index: var(--cpts-pastilles-z, 1);
	top: var(--cpts-pastilles-haut, auto);
	bottom: var(--cpts-pastilles-bas, auto);
	width: var(--cpts-pastilles-largeur);
	aspect-ratio: var(--cpts-pastilles-ratio);
	background: var(--cpts-pastilles);
	pointer-events: none;
}

/* points-bleu-framboise.png (270 x 429), pinned to the right edge of the 1440 grid (formerly site.css).
   Elodie's own image at twice that size since 26/11/2026: drawn in gradients, the 1 px white rings came out
   jagged at 120 px ("un peu pixellisés"). Same box, same ratio, so nothing moves. */
.e-con.cpts-deco-pastilles {
	--cpts-pastilles-largeur: 120px;
	--cpts-pastilles-bas: -52px;
	--cpts-pastilles-ratio: 270 / 429;
	--cpts-pastilles: url("decor/ronds-bleu-framboise.webp") center / 100% 100% no-repeat;
}

.e-con.cpts-deco-pastilles::after {
	right: max(20px, calc(50% - 720px));
}

/* pastilles-heros-interieur.svg (XD group of 13/11/2026, 168 x 333): Outils, Soins non programmés.
   The SVG itself since 26/11/2026, like the home dots: the gradient copy drew the 1 px rings jagged. */
.e-con.cpts-deco-pastilles-interieur {
	--cpts-pastilles-largeur: 168px;
	--cpts-pastilles-gauche: calc(50% + 559px);
	--cpts-pastilles-haut: -18px;
	--cpts-pastilles-ratio: 168 / 333;
	--cpts-pastilles: url("decor/pastilles-heros-interieur.svg") center / 100% 100% no-repeat;
}

.e-con.cpts-deco-pastilles-interieur::after {
	left: var(--cpts-pastilles-gauche);
}

@media (max-width: 1440px) {
	.e-con.cpts-deco-pastilles-interieur {
		--cpts-pastilles-largeur: 134px;
		--cpts-pastilles-gauche: calc(100% - 148px);
		--cpts-pastilles-haut: 12px;
	}
}

@media (max-width: 1024px) {
	.e-con.cpts-deco-pastilles {
		--cpts-pastilles-largeur: 100px;
	}

	.e-con.cpts-deco-pastilles-interieur {
		--cpts-pastilles-largeur: 111px;
		--cpts-pastilles-gauche: calc(100% - 127px);
		--cpts-pastilles-haut: 13px;
	}
}

@media (max-width: 767px) {
	.e-con:is(.cpts-deco-pastilles, .cpts-deco-pastilles-interieur)::after {
		content: none;
	}
}
