/*
 * Bloc Instagram — « Rejoins-nous sur Instagram » (maquette reference-section-instagram).
 *
 * Fond crème rosé avec deux formes organiques claires. Gauche : bulle cœur, titre
 * (« Instagram » en rose, plus grand), texte, compte (pastille blanche) et bouton rose.
 * Droite : 4 publications en cartes façon Instagram, légèrement inclinées, décalées
 * et superposées (pas de 3D), grand logo Instagram en haut à droite.
 * Bas : vague marine traversée d'un trait rose en pointillés, message manuscrit
 * souligné de rose, mascotte sur sa pile de livres dans le coin inférieur gauche.
 * - À partir de 1100 px : composition de la maquette (texte | publications).
 * - 700 à 1099 px : texte puis 3 publications ; mascotte plus petite.
 * - Moins de 700 px : titre, texte, compte, bouton, 3 publications en éventail,
 *   mascotte et message sur la vague.
 * Apparition au défilement : assets/js/apparition.js (rien si animations réduites).
 */

.ltl-instagram.ltl-section {
	--ltl-instagram-vague: clamp(96px, 11vw, 168px);
	position: relative;
	overflow: hidden;
	padding-top: 48px;
	padding-bottom: 0;
	background:
		radial-gradient(60% 55% at 4% 8%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 70%),
		radial-gradient(42% 60% at 100% 40%, rgba(253, 222, 226, 0.9), rgba(253, 222, 226, 0) 72%),
		linear-gradient(180deg, #fff6f1 0%, #fdeeea 55%, #fbe7e6 100%);
}

/* Formes organiques claires, en arrière-plan (décor). */
.ltl-instagram.ltl-section::before,
.ltl-instagram.ltl-section::after {
	content: "";
	position: absolute;
	z-index: 0;
	border-radius: 46% 54% 58% 42% / 52% 44% 56% 48%;
	pointer-events: none;
}

.ltl-instagram.ltl-section::before {
	top: -18%;
	left: 34%;
	width: 46vw;
	height: 46vw;
	max-width: 680px;
	max-height: 680px;
	background: rgba(255, 255, 255, 0.55);
}

.ltl-instagram.ltl-section::after {
	bottom: 6%;
	right: -10%;
	width: 30vw;
	height: 22vw;
	max-width: 440px;
	max-height: 320px;
	background: rgba(248, 205, 214, 0.35);
}

.ltl-instagram__cache {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.ltl-instagram__contenu {
	position: relative;
	z-index: 4;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 32px;
}

/* ------------------------------------------------------------------ */
/* Texte                                                              */
/* ------------------------------------------------------------------ */

.ltl-instagram__texte {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 18px;
	min-width: 0;
}

.ltl-instagram__traits {
	width: 28px;
	height: 28px;
	color: var(--ltl-rose);
	flex: none;
}

.ltl-instagram__bulle {
	position: relative;
	display: block;
	width: 64px;
	margin-left: 34px;
	filter: drop-shadow(0 8px 12px rgba(209, 28, 87, 0.28));
	rotate: -6deg;
}

.ltl-instagram__bulle > svg:last-child {
	display: block;
	width: 100%;
	height: auto;
}

.ltl-instagram__bulle .ltl-instagram__traits {
	position: absolute;
	top: 34px;
	left: -38px;
	rotate: 6deg;
}

.ltl-instagram .ltl-instagram__titre {
	display: flex;
	flex-direction: column;
	color: var(--ltl-marine);
	font-family: var(--ltl-font-titre);
	font-size: clamp(34px, 8.6vw, 44px);
	font-weight: 700;
	line-height: 1.02;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

.ltl-instagram__accent {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	align-self: flex-start;
	color: var(--ltl-rose-action);
	font-size: 1.28em;
}

.ltl-instagram__accent .ltl-instagram__traits {
	width: 0.42em;
	height: 0.42em;
	rotate: 180deg;
	margin-top: 0.12em;
}

.ltl-instagram__intro {
	max-width: 30ch;
	color: #2c3858;
	font-size: 18px;
	line-height: 1.45;
}

.ltl-instagram__actions {
	display: flex;
	flex-direction: column;
	gap: 16px;
	width: 100%;
	max-width: 380px;
	margin-top: 6px;
}

.ltl-instagram__compte {
	display: flex;
	align-items: center;
	gap: 14px;
	min-height: 64px;
	padding: 8px 22px 8px 8px;
	border: 1.5px solid #f6d3dc;
	border-radius: 999px;
	background: var(--ltl-blanc);
	box-shadow: 0 10px 24px rgba(14, 27, 61, 0.08);
	color: var(--ltl-marine);
	font-size: 20px;
	font-weight: 800;
	text-decoration: none;
	transition: transform 0.2s var(--ltl-ease), box-shadow 0.2s ease, border-color 0.2s ease;
}

.ltl-instagram__compte-logo {
	width: 48px;
	height: 48px;
	flex: none;
	border-radius: 50%;
	box-shadow: 0 4px 10px rgba(199, 47, 184, 0.25);
}

.ltl-instagram__compte-nom {
	flex: 1;
	min-width: 0;
	overflow-wrap: anywhere;
}

.ltl-instagram__compte-fleche {
	width: 22px;
	height: 22px;
	flex: none;
	color: var(--ltl-rose-action);
	transition: transform 0.2s var(--ltl-ease);
}

.ltl-instagram .ltl-instagram__bouton {
	min-height: 64px;
	padding-inline: 28px;
	border-radius: 999px;
	font-size: 19px;
	box-shadow: 0 5px 0 var(--ltl-rose-ombre), 0 16px 28px rgba(209, 28, 87, 0.28);
}

.ltl-instagram__bouton svg {
	width: 24px;
	height: 24px;
	flex: none;
	transition: transform 0.2s var(--ltl-ease);
}

@media (hover: hover) and (pointer: fine) {
	.ltl-instagram__compte:hover {
		border-color: var(--ltl-rose);
		box-shadow: 0 14px 28px rgba(14, 27, 61, 0.12);
		transform: translateY(-2px);
	}

	.ltl-instagram__compte:hover .ltl-instagram__compte-fleche {
		transform: translate(2px, -2px);
	}

	.ltl-instagram__bouton:hover svg {
		transform: translateX(3px);
	}
}

.ltl-instagram__compte:focus-visible,
.ltl-instagram .ltl-instagram__bouton:focus-visible,
.ltl-instagram__carte:focus-visible {
	outline: 3px solid var(--ltl-turquoise-lien);
	outline-offset: 3px;
}

/* ------------------------------------------------------------------ */
/* Publications                                                       */
/* ------------------------------------------------------------------ */

.ltl-instagram__publications {
	position: relative;
	min-width: 0;
	padding-top: 44px;
}

.ltl-instagram__logo {
	position: absolute;
	z-index: 6;
	top: 0;
	right: 0;
	display: flex;
	align-items: flex-start;
	gap: 4px;
	rotate: 8deg;
}

.ltl-instagram__logo-image {
	display: block;
	width: 76px;
	height: 76px;
	filter: drop-shadow(0 12px 18px rgba(199, 47, 184, 0.3));
}

.ltl-instagram__logo .ltl-instagram__traits {
	width: 26px;
	height: 26px;
	margin-top: 6px;
	rotate: -8deg;
}

.ltl-instagram .ltl-instagram__liste {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	margin: 0;
	padding: 0 0 8px;
	list-style: none;
}

.ltl-instagram__post {
	position: relative;
	flex: 0 0 var(--ltl-instagram-carte, 40%);
	min-width: 0;
	margin: 0;
	padding: 0;
}

.ltl-instagram__post + .ltl-instagram__post {
	margin-left: var(--ltl-instagram-chevauchement, -10%);
}

.ltl-instagram__carte {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 8px 8px 10px;
	border-radius: 16px;
	background: var(--ltl-blanc);
	box-shadow: 0 2px 4px rgba(14, 27, 61, 0.05), 0 18px 36px rgba(14, 27, 61, 0.16);
	color: var(--ltl-marine);
	text-decoration: none;
	transform: rotate(var(--ltl-instagram-rotation, 0deg));
	transition: transform 0.25s var(--ltl-ease), box-shadow 0.25s ease;
}

a.ltl-instagram__carte:hover {
	box-shadow: 0 2px 4px rgba(14, 27, 61, 0.05), 0 24px 44px rgba(14, 27, 61, 0.2);
}

.ltl-instagram__entete {
	display: flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
	padding: 2px 2px 0;
}

.ltl-section img.ltl-instagram__avatar {
	width: 24px;
	height: 24px;
	flex: none;
	padding: 2px;
	border-radius: 50%;
	background: var(--ltl-blanc);
	box-shadow: 0 0 0 1.5px var(--ltl-marine);
	object-fit: contain;
}

.ltl-instagram__pseudo {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	font-size: 11px;
	font-weight: 700;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ltl-instagram__points {
	width: 16px;
	height: 16px;
	flex: none;
	fill: currentColor;
}

.ltl-section img.ltl-instagram__image {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
	border-radius: 4px;
	object-fit: cover;
	background: var(--ltl-rose-clair);
}

.ltl-instagram__barre {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0 2px;
}

.ltl-instagram__barre svg {
	width: 17px;
	height: 17px;
	flex: none;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.9;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.ltl-instagram__barre .ltl-instagram__signet {
	margin-left: auto;
}

/* Disposition des cartes : inclinaison, décalage vertical, superposition. */
.ltl-instagram__post:nth-child(1) { --ltl-instagram-rotation: -3deg; z-index: 1; }
.ltl-instagram__post:nth-child(2) { --ltl-instagram-rotation: -1.5deg; z-index: 2; margin-top: 12px; }
.ltl-instagram__post:nth-child(3) { --ltl-instagram-rotation: -2deg; z-index: 3; margin-top: 22px; }
.ltl-instagram__post:nth-child(4) { --ltl-instagram-rotation: 3deg; z-index: 4; margin-top: 40px; }

/* ------------------------------------------------------------------ */
/* Bas : message, mascotte, vague                                     */
/* ------------------------------------------------------------------ */

.ltl-instagram .ltl-instagram__note {
	position: relative;
	z-index: 3;
	display: flex;
	align-items: center;
	gap: 12px;
	justify-self: center;
	margin: 0;
	rotate: -3deg;
}

.ltl-instagram__note-texte {
	position: relative;
	display: inline-block;
	padding: 10px 22px 14px;
	border-radius: 999px 999px 999px 999px / 70% 70% 90% 90%;
	background: rgba(255, 255, 255, 0.92);
	box-shadow: 0 10px 22px rgba(14, 27, 61, 0.1);
	color: var(--ltl-marine);
	font-family: var(--ltl-font-titre);
	font-size: 19px;
	font-style: italic;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.01em;
}

/* Soulignement rose dessiné. */
.ltl-instagram__note-texte::after {
	content: "";
	position: absolute;
	left: 14%;
	right: 6%;
	bottom: 5px;
	height: 6px;
	border-radius: 50%;
	border-bottom: 3px solid var(--ltl-rose);
	rotate: 1deg;
}

.ltl-instagram__coeur {
	width: 34px;
	height: 34px;
	flex: none;
	fill: var(--ltl-rose);
	filter: drop-shadow(0 6px 8px rgba(209, 28, 87, 0.25));
	rotate: 6deg;
}

.ltl-section img.ltl-instagram__mascotte {
	position: absolute;
	z-index: 3;
	bottom: 6px;
	left: max(-6px, calc(50% - 760px));
	width: 128px;
	max-width: none;
	height: auto;
	filter: drop-shadow(0 14px 18px rgba(8, 18, 48, 0.3));
	pointer-events: none;
	user-select: none;
}

.ltl-instagram__vague {
	position: relative;
	z-index: 1;
	display: block;
	width: calc(100% + 2 * var(--ltl-gouttiere));
	margin-inline: calc(-1 * var(--ltl-gouttiere));
	height: var(--ltl-instagram-vague);
	margin-top: calc(var(--ltl-instagram-vague) * -0.42);
	overflow: visible;
}

.ltl-instagram__vague-fond {
	fill: #13224c;
}

.ltl-instagram__vague-trait {
	fill: none;
	stroke: var(--ltl-rose);
	stroke-width: 2.4;
	stroke-dasharray: 10 9;
	stroke-linecap: round;
	vector-effect: non-scaling-stroke;
}

/* Mobile : 3 publications en éventail ; mascotte et message sur la vague. */
@media (max-width: 699px) {
	.ltl-instagram__post:nth-child(n + 4) {
		display: none;
	}

	.ltl-instagram__post:nth-child(2) {
		z-index: 5;
		margin-top: 0;
		--ltl-instagram-rotation: 0deg;
		scale: 1.08;
	}

	.ltl-instagram__post:nth-child(1) { margin-top: 18px; --ltl-instagram-rotation: -5deg; }
	.ltl-instagram__post:nth-child(3) { margin-top: 18px; --ltl-instagram-rotation: 5deg; }

	.ltl-instagram__logo {
		right: 2px;
	}

	.ltl-instagram__logo-image {
		width: 56px;
		height: 56px;
	}

	.ltl-instagram__logo .ltl-instagram__traits {
		width: 20px;
		height: 20px;
	}

	.ltl-instagram__carte {
		gap: 6px;
		padding: 6px 6px 8px;
		border-radius: 12px;
	}

	.ltl-instagram__entete .ltl-instagram__pseudo {
		font-size: 9px;
	}

	.ltl-section img.ltl-instagram__avatar {
		width: 18px;
		height: 18px;
	}

	.ltl-instagram__barre {
		gap: 5px;
	}

	.ltl-instagram__barre svg {
		width: 13px;
		height: 13px;
	}

	.ltl-instagram .ltl-instagram__note {
		justify-self: end;
		max-width: calc(100% - 118px);
		margin-top: 4px;
	}

	.ltl-instagram__note-texte {
		font-size: 16px;
		text-align: center;
	}

	.ltl-instagram__coeur {
		display: none;
	}

	.ltl-instagram.ltl-section {
		--ltl-instagram-vague: 92px;
	}

	.ltl-instagram__publications {
		padding-bottom: 28px;
	}
}

@media (max-width: 399px) {
	.ltl-section img.ltl-instagram__mascotte {
		width: 108px;
	}

	.ltl-instagram .ltl-instagram__note {
		max-width: calc(100% - 98px);
	}

	.ltl-instagram__note-texte {
		padding-inline: 14px;
		font-size: 15px;
	}
}

/* Tablette : texte puis 3 publications ; mascotte plus présente. */
@media (min-width: 700px) {
	.ltl-instagram.ltl-section {
		padding-top: 64px;
	}

	.ltl-instagram .ltl-instagram__titre {
		font-size: 52px;
	}

	.ltl-instagram__intro {
		max-width: 34ch;
		font-size: 19px;
	}

	.ltl-instagram__actions {
		flex-direction: row;
		flex-wrap: wrap;
		max-width: none;
	}

	.ltl-instagram__compte,
	.ltl-instagram .ltl-instagram__bouton {
		flex: 1 1 300px;
		max-width: 380px;
	}

	.ltl-instagram__liste {
		--ltl-instagram-carte: 35.5%;
		--ltl-instagram-chevauchement: -3.25%;
	}

	.ltl-instagram__post:nth-child(n + 4) {
		display: none;
	}

	.ltl-instagram .ltl-instagram__liste {
		max-width: 660px;
		margin-inline: auto;
	}

	.ltl-instagram__publications {
		padding-top: 24px;
		padding-bottom: 72px;
	}

	.ltl-instagram__logo-image {
		width: 88px;
		height: 88px;
	}

	.ltl-instagram .ltl-instagram__note {
		margin-left: 200px;
	}

	.ltl-section img.ltl-instagram__mascotte {
		width: 190px;
	}
}

/* Ordinateur : composition de la maquette. */
@media (min-width: 1100px) {
	.ltl-instagram.ltl-section {
		padding-top: 56px;
	}

	.ltl-instagram__contenu {
		grid-template-columns: minmax(440px, 0.8fr) minmax(0, 2fr);
		grid-template-rows: auto auto;
		column-gap: clamp(16px, 2.4vw, 40px);
		row-gap: 0;
	}

	.ltl-instagram__texte {
		grid-row: 1 / 3;
		padding-top: 4px;
		padding-bottom: 116px;
	}

	.ltl-instagram .ltl-instagram__titre {
		font-size: clamp(44px, 3.5vw, 52px);
	}

	.ltl-instagram__intro {
		max-width: 26ch;
		margin-left: 2px;
		font-size: clamp(19px, 1.45vw, 21px);
	}

	.ltl-instagram__actions {
		flex-direction: column;
		width: auto;
		max-width: 290px;
		margin-left: clamp(120px, 10.6vw, 152px);
		margin-top: 10px;
	}

	.ltl-instagram__compte,
	.ltl-instagram .ltl-instagram__bouton {
		flex: none;
		width: 100%;
		min-height: 60px;
		font-size: 18px;
		white-space: nowrap;
	}

	.ltl-instagram__compte-logo {
		width: 44px;
		height: 44px;
	}

	.ltl-instagram__publications {
		grid-column: 2;
		padding-top: 52px;
		padding-bottom: 8px;
	}

	.ltl-instagram__liste {
		--ltl-instagram-carte: 26.2%;
		--ltl-instagram-chevauchement: -1.6%;
	}

	.ltl-instagram .ltl-instagram__liste {
		justify-content: flex-start;
		max-width: none;
		margin-inline: 0;
		padding-inline: 0 2%;
	}

	.ltl-instagram__post:nth-child(n + 4) {
		display: block;
	}

	.ltl-instagram__logo {
		top: 0;
		right: -10px;
	}

	.ltl-instagram__logo-image {
		width: clamp(96px, 7.8vw, 116px);
		height: clamp(96px, 7.8vw, 116px);
	}

	.ltl-instagram__logo .ltl-instagram__traits {
		width: 34px;
		height: 34px;
		margin-top: 10px;
	}

	.ltl-instagram__carte {
		gap: 10px;
		padding: 10px 10px 12px;
		border-radius: 18px;
	}

	.ltl-instagram__pseudo {
		font-size: 12px;
	}

	.ltl-section img.ltl-instagram__avatar {
		width: 28px;
		height: 28px;
	}

	.ltl-instagram__barre svg {
		width: 19px;
		height: 19px;
	}

	.ltl-instagram .ltl-instagram__note {
		grid-column: 2;
		margin: 6px 0 0 20%;
		justify-self: start;
	}

	.ltl-instagram__note-texte {
		font-size: clamp(20px, 1.7vw, 24px);
	}

	.ltl-section img.ltl-instagram__mascotte {
		width: clamp(200px, 16.5vw, 244px);
		bottom: 4px;
	}

	.ltl-instagram.ltl-section {
		--ltl-instagram-vague: clamp(150px, 12.5vw, 190px);
	}

	.ltl-instagram__vague {
		margin-top: calc(var(--ltl-instagram-vague) * -0.62);
	}
}

/* Animations réduites : pas de transition au survol. */
@media (prefers-reduced-motion: reduce) {
	.ltl-instagram__compte,
	.ltl-instagram__compte-fleche,
	.ltl-instagram__bouton svg,
	.ltl-instagram__carte {
		transition: none;
	}
}
