/* ==========================================================================
   Imperial Dog & Cat - Main Stylesheet
   ========================================================================== */

/* ---------- CSS Custom Properties (Palette) ---------- */
:root {
	/* Couleurs principales */
	--terra:     #4BAEE0;
	--terra-dk:  #2E96CC;
	--terra-lt:  #9BCBEB;
	--terra-xlt: #EAF5FC;

	--brown:     #1A1A1A;
	--brown-dk:  #000000;
	--brown-lt:  #444444;

	--coal:      #111111;

	/* Fonds & surfaces */
	--warm:      #FFFFFF;
	--white:     #FFFFFF;
	--cream:     #F4F8FB;
	--cream-dk:  #E2EFF7;
	--sand:      #CBE5F4;

	/* Texte */
	--stone:     #707070;

	/* Spacing */
	--container-max: 1280px;
	--container-pad: 20px;

	/* Transitions */
	--transition: 0.3s ease;

	/* Header height (for offset) */
	--header-h: 72px;
	--announcement-h: 40px;
}

/* ---------- Base resets ---------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	color: var(--brown);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
	-webkit-font-smoothing: antialiased;
}

/* ---------- Container ---------- */
.idc-container {
	max-width: var(--container-max);
	margin: 0 auto;
	padding-left: var(--container-pad);
	padding-right: var(--container-pad);
	width: 100%;
}

/* ---------- Buttons ---------- */
.idc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 24px;
	border: none;
	border-radius: 50px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	cursor: pointer;
	text-decoration: none;
	transition: background var(--transition), color var(--transition), transform var(--transition);
	white-space: nowrap;
}

.idc-btn:hover {
	transform: translateY(-1px);
}

.idc-btn-primary {
	background: var(--terra);
	color: var(--white);
}

.idc-btn-primary:hover {
	background: var(--terra-dk);
	color: var(--white);
}

.idc-btn-outline {
	background: transparent;
	color: var(--terra);
	border: 2px solid var(--terra);
}

.idc-btn-outline:hover {
	background: var(--terra);
	color: var(--white);
}

.idc-btn-dark {
	background: var(--brown);
	color: var(--white);
}

.idc-btn-dark:hover {
	background: var(--brown-dk);
	color: var(--white);
}

/* ---------- Homepage: Step cards hover ---------- */
.elementor-element-st1,
.elementor-element-st2,
.elementor-element-f881cd8,
.elementor-element-a979b71 {
	transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.elementor-element-st1:hover,
.elementor-element-st2:hover,
.elementor-element-f881cd8:hover,
.elementor-element-a979b71:hover {
	transform: translateY(-5px);
	border-color: var(--terra-lt) !important;
	box-shadow:
		0 4px 6px rgba(0, 0, 0, 0.04),
		0 10px 24px rgba(0, 0, 0, 0.08),
		0 20px 48px rgba(0, 0, 0, 0.06);
}

/* ==========================================================================
   Section "Comment ça marche" — animations
   Cibles : .elementor-element-st1 / st2 / f881cd8 / a979b71
   ========================================================================== */

/* État initial pour l'apparition (avant scroll) */
.elementor-element-st1,
.elementor-element-st2,
.elementor-element-f881cd8,
.elementor-element-a979b71 {
	opacity: 0;
	transform: translateY(30px);
	transition: opacity 1s ease, transform 1s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

/* Reveal au scroll : la classe .idc-anim-in est ajoutée par JS */
.idc-anim-in.elementor-element-st1,
.idc-anim-in.elementor-element-st2,
.idc-anim-in.elementor-element-f881cd8,
.idc-anim-in.elementor-element-a979b71 {
	opacity: 1;
	transform: translateY(0);
}

/* Stagger : chaque carte arrive 250ms après la précédente */
.idc-anim-in.elementor-element-st1     { transition-delay: 0.00s; }
.idc-anim-in.elementor-element-st2     { transition-delay: 0.25s; }
.idc-anim-in.elementor-element-f881cd8 { transition-delay: 0.50s; }
.idc-anim-in.elementor-element-a979b71 { transition-delay: 0.75s; }

/* ---------- Pulse en boucle 1 → 2 → 3 → 4 ---------- */
@keyframes idc-step-pulse {
	0%, 20% {
		border-color: var(--terra) !important;
		box-shadow:
			0 0 0 0 rgba(75, 174, 224, 0.45),
			0 10px 24px rgba(75, 174, 224, 0.18),
			0 20px 48px rgba(75, 174, 224, 0.10);
		transform: translateY(-6px) scale(1.02);
	}
	25% {
		box-shadow:
			0 0 0 14px rgba(75, 174, 224, 0),
			0 10px 24px rgba(75, 174, 224, 0.18),
			0 20px 48px rgba(75, 174, 224, 0.10);
	}
	35%, 100% {
		border-color: transparent;
		box-shadow: none;
		transform: translateY(0) scale(1);
	}
}

/* Le pulse ne démarre qu'une fois la section visible (cycle de 12s) */
.idc-anim-in.elementor-element-st1     { animation: idc-step-pulse 12s ease-in-out 1.0s infinite; }
.idc-anim-in.elementor-element-st2     { animation: idc-step-pulse 12s ease-in-out 4.0s infinite; }
.idc-anim-in.elementor-element-f881cd8 { animation: idc-step-pulse 12s ease-in-out 7.0s infinite; }
.idc-anim-in.elementor-element-a979b71 { animation: idc-step-pulse 12s ease-in-out 10.0s infinite; }

/* Pause au survol d'une carte (classe ajoutée par JS sur les 4 cartes) */
.elementor-element-st1.is-paused,
.elementor-element-st2.is-paused,
.elementor-element-f881cd8.is-paused,
.elementor-element-a979b71.is-paused,
.elementor-element-st1.is-paused .elementor-icon,
.elementor-element-st2.is-paused .elementor-icon,
.elementor-element-f881cd8.is-paused .elementor-icon,
.elementor-element-a979b71.is-paused .elementor-icon {
	animation-play-state: paused !important;
}

/* Pulse aussi sur le badge numéro (le icon-box rond bleu à l'intérieur de la carte) */
.elementor-element-st1 .elementor-icon,
.elementor-element-st2 .elementor-icon,
.elementor-element-f881cd8 .elementor-icon,
.elementor-element-a979b71 .elementor-icon {
	transition: transform 0.4s ease, box-shadow 0.4s ease;
}

@keyframes idc-badge-pulse {
	0%, 18% {
		transform: scale(1.18);
		box-shadow: 0 0 0 0 rgba(75, 174, 224, 0.55);
	}
	30% {
		box-shadow: 0 0 0 18px rgba(75, 174, 224, 0);
	}
	40%, 100% {
		transform: scale(1);
		box-shadow: 0 0 0 0 rgba(75, 174, 224, 0);
	}
}

.idc-anim-in.elementor-element-st1 .elementor-icon     { animation: idc-badge-pulse 12s ease-in-out 1.0s infinite; }
.idc-anim-in.elementor-element-st2 .elementor-icon     { animation: idc-badge-pulse 12s ease-in-out 4.0s infinite; }
.idc-anim-in.elementor-element-f881cd8 .elementor-icon { animation: idc-badge-pulse 12s ease-in-out 7.0s infinite; }
.idc-anim-in.elementor-element-a979b71 .elementor-icon { animation: idc-badge-pulse 12s ease-in-out 10.0s infinite; }

/* Pause les animations si l'utilisateur préfère "reduce motion" */
@media (prefers-reduced-motion: reduce) {
	.elementor-element-st1,
	.elementor-element-st2,
	.elementor-element-f881cd8,
	.elementor-element-a979b71,
	.elementor-element-st1 .elementor-icon,
	.elementor-element-st2 .elementor-icon,
	.elementor-element-f881cd8 .elementor-icon,
	.elementor-element-a979b71 .elementor-icon {
		animation: none !important;
		opacity: 1 !important;
		transform: none !important;
	}
}

/* ==========================================================================
   Zoom hover card
   Usage : ajouter la classe CSS "idc-zoom-card" sur la colonne/section
   Elementor (Avancé → Classes CSS) — utilisable sur "Nos engagements"
   ou n'importe quelle carte.
   ========================================================================== */
.idc-zoom-card {
	overflow: hidden;
	transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
				box-shadow 0.5s ease,
				border-color 0.5s ease;
	will-change: transform;
}

.idc-zoom-card:hover {
	transform: translateY(-8px) scale(1.03);
	box-shadow:
		0 6px 12px rgba(0, 0, 0, 0.06),
		0 16px 32px rgba(0, 0, 0, 0.10),
		0 28px 56px rgba(75, 174, 224, 0.12);
	border-color: var(--terra-lt, #9BCBEB) !important;
	z-index: 2;
}

/* Zoom interne sur l'image / icône de la carte */
.idc-zoom-card img,
.idc-zoom-card .elementor-icon,
.idc-zoom-card .elementor-image-box-img img {
	transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.idc-zoom-card:hover img,
.idc-zoom-card:hover .elementor-icon,
.idc-zoom-card:hover .elementor-image-box-img img {
	transform: scale(1.08);
}

/* Si "reduce motion" → on désactive */
@media (prefers-reduced-motion: reduce) {
	.idc-zoom-card,
	.idc-zoom-card:hover,
	.idc-zoom-card img,
	.idc-zoom-card:hover img {
		transform: none !important;
		transition: none !important;
	}
}

/* ==========================================================================
   Classe réutilisable : 2 têtes chien/chat en fond
   Usage : ajouter "idc-pet-heads-bg" sur une section Elementor
   (Avancé → Classes CSS). Tête de chien en haut à gauche,
   tête de chat au milieu à droite.
   ========================================================================== */
.idc-pet-heads-bg {
	position: relative;
	overflow: hidden;
	background-color: var(--cream, #F4F8FB);
}

.idc-pet-heads-bg::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	background-image:
		/* Patte de chien — haut gauche (grosse patte, 4 gros coussinets) */
		url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><g fill='%234BAEE0' fill-opacity='0.15' transform='rotate(-10 100 100)'><ellipse cx='100' cy='135' rx='46' ry='36'/><ellipse cx='42' cy='70' rx='17' ry='22' transform='rotate(-20 42 70)'/><ellipse cx='74' cy='42' rx='17' ry='22' transform='rotate(-8 74 42)'/><ellipse cx='126' cy='42' rx='17' ry='22' transform='rotate(8 126 42)'/><ellipse cx='158' cy='70' rx='17' ry='22' transform='rotate(20 158 70)'/></g></svg>"),
		/* Patte de chat — milieu droite (plus petite, coussinets plus ronds) */
		url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><g fill='%234BAEE0' fill-opacity='0.15' transform='rotate(18 100 100)'><ellipse cx='100' cy='130' rx='38' ry='30'/><circle cx='52' cy='70' r='15'/><circle cx='80' cy='46' r='15'/><circle cx='120' cy='46' r='15'/><circle cx='148' cy='70' r='15'/></g></svg>");
	background-repeat: no-repeat, no-repeat;
	background-position:
		left -60px top -40px,
		right -80px center;
	background-size:
		340px 340px,
		380px 380px;
}

/* Contenu au-dessus */
.idc-pet-heads-bg > .elementor-container,
.idc-pet-heads-bg > .e-con-inner,
.idc-pet-heads-bg > * {
	position: relative;
	z-index: 1;
}

/* Variante plus visible (opacity boost) */
.idc-pet-heads-bg--terra {
	background-color: var(--terra-xlt, #EAF5FC);
}

/* Responsive : tailles réduites sur mobile */
@media (max-width: 768px) {
	.idc-pet-heads-bg::after {
		background-size:
			200px 200px,
			220px 220px;
		background-position:
			left -40px top -30px,
			right -60px center;
	}
}

/* ==========================================================================
   Section blog / actualités — fond cream + grosse empreinte décorative
   Usage : ajouter la classe "idc-blog-bg" sur la section Elementor
   (Avancé → Classes CSS).
   Variante : "idc-blog-bg--left" pour décaler l'empreinte à gauche.
   ========================================================================== */
.idc-blog-bg {
	position: relative;
	background-color: var(--cream, #F4F8FB);
	overflow: hidden;
}

/* Empreinte SVG : un seul ::after qui contient les DEUX empreintes
   (haut-droite et centre-gauche) dans un grand SVG plein écran.
   On évite ainsi le conflit avec ::before qu'Elementor utilise pour les overlays. */
.idc-blog-bg::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	background-image:
		url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><g fill='%234BAEE0' fill-opacity='0.10' transform='rotate(-12 100 100)'><ellipse cx='100' cy='130' rx='38' ry='30'/><ellipse cx='52' cy='70' rx='14' ry='17' transform='rotate(-18 52 70)'/><ellipse cx='80' cy='44' rx='14' ry='18' transform='rotate(-6 80 44)'/><ellipse cx='120' cy='44' rx='14' ry='18' transform='rotate(6 120 44)'/><ellipse cx='148' cy='70' rx='14' ry='17' transform='rotate(18 148 70)'/></g></svg>"),
		url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><g fill='%234BAEE0' fill-opacity='0.10' transform='rotate(22 100 100)'><ellipse cx='100' cy='130' rx='38' ry='30'/><ellipse cx='52' cy='70' rx='14' ry='17' transform='rotate(-18 52 70)'/><ellipse cx='80' cy='44' rx='14' ry='18' transform='rotate(-6 80 44)'/><ellipse cx='120' cy='44' rx='14' ry='18' transform='rotate(6 120 44)'/><ellipse cx='148' cy='70' rx='14' ry='17' transform='rotate(18 148 70)'/></g></svg>");
	background-repeat: no-repeat, no-repeat;
	background-position: right -80px top 80px, left -60px center;
	background-size: 520px 520px, 420px 420px;
}

/* Le contenu Elementor doit rester au-dessus des empreintes */
.idc-blog-bg > .elementor-container,
.idc-blog-bg > .e-con-inner,
.idc-blog-bg > * {
	position: relative;
	z-index: 1;
}

/* Responsive : empreintes plus petites sur mobile */
@media (max-width: 768px) {
	.idc-blog-bg::after {
		background-size: 280px 280px, 220px 220px;
		background-position: right -60px top 40px, left -50px center;
	}
}

/* ==========================================================================
   Paw print background pattern
   Usage : ajouter la classe CSS "idc-paw-bg" sur la section Elementor
   (Avancé → Classes CSS). Variantes : idc-paw-bg--dark, idc-paw-bg--terra
   ========================================================================== */
.idc-paw-bg {
	position: relative;
	background-color: var(--cream, #F4F8FB);
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'><g fill='%234BAEE0' fill-opacity='0.10'><ellipse cx='40' cy='52' rx='12' ry='9'/><circle cx='24' cy='34' r='4.5'/><circle cx='34' cy='26' r='4.5'/><circle cx='46' cy='26' r='4.5'/><circle cx='56' cy='34' r='4.5'/><ellipse cx='90' cy='100' rx='12' ry='9' transform='rotate(20 90 100)'/><circle cx='74' cy='82' r='4.5'/><circle cx='84' cy='74' r='4.5'/><circle cx='96' cy='74' r='4.5'/><circle cx='106' cy='82' r='4.5'/></g></svg>");
	background-repeat: repeat;
	background-size: 180px 180px;
}

/* Variante fond sombre (pour sections "Nos engagements" sur fond foncé) */
.idc-paw-bg--dark {
	background-color: var(--brown, #1A1A1A);
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'><g fill='%23ffffff' fill-opacity='0.06'><ellipse cx='40' cy='52' rx='12' ry='9'/><circle cx='24' cy='34' r='4.5'/><circle cx='34' cy='26' r='4.5'/><circle cx='46' cy='26' r='4.5'/><circle cx='56' cy='34' r='4.5'/><ellipse cx='90' cy='100' rx='12' ry='9' transform='rotate(20 90 100)'/><circle cx='74' cy='82' r='4.5'/><circle cx='84' cy='74' r='4.5'/><circle cx='96' cy='74' r='4.5'/><circle cx='106' cy='82' r='4.5'/></g></svg>");
}

/* Variante bleu terra plein (très visible) */
.idc-paw-bg--terra {
	background-color: var(--terra-xlt, #EAF5FC);
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'><g fill='%232E96CC' fill-opacity='0.14'><ellipse cx='40' cy='52' rx='12' ry='9'/><circle cx='24' cy='34' r='4.5'/><circle cx='34' cy='26' r='4.5'/><circle cx='46' cy='26' r='4.5'/><circle cx='56' cy='34' r='4.5'/><ellipse cx='90' cy='100' rx='12' ry='9' transform='rotate(20 90 100)'/><circle cx='74' cy='82' r='4.5'/><circle cx='84' cy='74' r='4.5'/><circle cx='96' cy='74' r='4.5'/><circle cx='106' cy='82' r='4.5'/></g></svg>");
}
