/* =========================================================================
   Sélecteur Repas Gourmet / Repas Médicalisé — bascule instantanée
   Couleurs : Gourmet #2e59a4 / #5182e5, Médicalisé #05964a (style.css du thème)
   ========================================================================= */

.irf {
	--irf-gourmet: #2e59a4;
	--irf-medical: #05964a;
}

/* Panneaux : masquage fiable */
.irf-panel.formule-hidden {
	display: none !important;
}

/* Aucune transition (mobile et desktop) sur les cartes et les panneaux de
   formules, y compris celles du style.css du thème. */
.irf [data-irf],
.irf [data-irf] > .col-inner,
.irf [data-irf] .inactive-color,
.irf [data-irf] .icon-inner img,
.irf-panel,
.irf-panel .tab-panels .panel {
	transition: none !important;
}

/* Cartes */
.irf [data-irf] {
	-webkit-tap-highlight-color: transparent;
	outline: none;
}

.irf [data-irf] > .col-inner {
	position: relative;
}

.irf [data-irf]:focus-visible > .col-inner {
	box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--irf-gourmet);
}

.irf .repas-medicalise:focus-visible > .col-inner {
	box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--irf-medical);
}

/* Carte active : ombre douce, comme « soulevée » */
.irf [data-irf] > .col-inner.is-active {
	box-shadow: 0 6px 18px rgba(20, 45, 90, .18);
}

/* =========================================================================
   Mobile
   ========================================================================= */
@media (max-width: 48em) {

	/* Carte inactive un peu plus effacée (état initial) */
	.irf [data-irf] > .col-inner:not(.is-active) {
		opacity: .85;
	}

	/* Indice « main » sur la carte inactive tant qu'on n'a pas encore cliqué */
	.irf:not(.irf-touched) [data-irf] > .col-inner:not(.is-active)::after {
		content: "";
		position: absolute;
		right: 10px;
		bottom: 8px;
		width: 34px;
		height: 34px;
		border-radius: 50%;
		background: rgba(255, 255, 255, .92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232e59a4' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 11V5.5a1.5 1.5 0 0 1 3 0V10'/%3E%3Cpath d='M12 10V8.5a1.5 1.5 0 0 1 3 0V11'/%3E%3Cpath d='M15 11v-.5a1.5 1.5 0 0 1 3 0V15a6 6 0 0 1-6 6h-1a6 6 0 0 1-4.6-2.2L4.2 16a1.6 1.6 0 0 1 2.4-2.1L9 16V11'/%3E%3C/svg%3E") center / 20px no-repeat;
		box-shadow: 0 2px 8px rgba(20, 45, 90, .25);
		pointer-events: none;
		animation: irf-tap 1.8s ease-in-out infinite;
	}

	.irf:not(.irf-touched) .repas-gourmet > .col-inner:not(.is-active)::after {
		animation-delay: .9s;
	}

	/* Ancrage du défilement sous le header sticky Flatsome */
	.irf-panel {
		scroll-margin-top: 90px;
	}
}

@keyframes irf-tap {
	0%, 100% { transform: scale(1); }
	45%      { transform: scale(.86); }
	60%      { transform: scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
	.irf [data-irf] > .col-inner::after {
		animation: none !important;
	}
}
