/* M'Gourmand - Recommandation de croquettes
   Toutes les classes sont préfixées en .mg-reco pour éviter tout conflit. */

.mg-reco {
	--mg-green-dark: #3B515E;
	--mg-green-light: #e8f1f7;
	--mg-orange: #f3a62d;
	--mg-cream: #fbf8f1;
	--mg-text: #3B515E;
	--mg-border: #e8f1f7;

	box-sizing: border-box;
	max-width: 1060px;
	margin: 0 auto;
	padding: 16px;
	color: var(--mg-text);
	font-family: "Lato", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.55;
}

.mg-reco *,
.mg-reco *::before,
.mg-reco *::after {
	box-sizing: border-box;
}

.mg-reco__inner {
	background: var(--mg-cream);
	border: 1px solid var(--mg-border);
	border-radius: 24px;
	padding: clamp(20px, 4vw, 48px);
}

/* ---------- Intro ---------- */
.mg-reco__intro {
	text-align: center;
	margin-bottom: 28px;
}

.mg-reco__eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--mg-orange);
	margin: 0 0 10px;
}

.mg-reco__title {
	font-family: "LEMON MILK", "Lato", Arial, sans-serif;
	font-size: clamp(1.5rem, 3.5vw, 2.4rem);
	line-height: 1.15;
	color: var(--mg-green-dark);
	margin: 0 0 14px;
}

.mg-reco__lead {
	max-width: 680px;
	margin: 0 auto;
	color: var(--mg-text);
}

/* ---------- Barre de progression ---------- */
.mg-reco__progress {
	list-style: none;
	display: flex;
	gap: 8px;
	padding: 0;
	margin: 0 0 28px;
	counter-reset: mg-step;
}

.mg-reco__progress-item {
	flex: 1 1 0;
	min-width: 0;
}

.mg-reco__progress-btn {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	background: #fff;
	border: 1px solid var(--mg-border);
	border-radius: 14px;
	padding: 10px 6px;
	font-family: inherit;
	font-size: 0.82rem;
	color: var(--mg-text);
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.mg-reco__progress-btn[disabled] {
	cursor: not-allowed;
	opacity: 0.6;
}

.mg-reco__progress-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--mg-green-light);
	color: var(--mg-green-dark);
	font-weight: 700;
}

.mg-reco__progress-label {
	text-align: center;
	line-height: 1.2;
}

.mg-reco__progress-item.is-active .mg-reco__progress-btn {
	border-color: var(--mg-green-dark);
	background: var(--mg-green-dark);
	color: #fff;
}

.mg-reco__progress-item.is-active .mg-reco__progress-num {
	background: var(--mg-orange);
	color: #fff;
}

.mg-reco__progress-item.is-done .mg-reco__progress-btn {
	border-color: var(--mg-green-dark);
	color: var(--mg-green-dark);
}

.mg-reco__progress-item.is-done .mg-reco__progress-num {
	background: var(--mg-green-dark);
	color: #fff;
}

/* ---------- Étapes ---------- */
.mg-reco__step {
	display: none;
}

.mg-reco__step.is-active {
	display: block;
	animation: mg-reco-fade 0.25s ease;
}

@keyframes mg-reco-fade {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}

.mg-reco__branch {
	display: none;
}

.mg-reco__branch.is-visible {
	display: block;
}

.mg-reco__question {
	font-family: "LEMON MILK", "Lato", Arial, sans-serif;
	font-size: 1.1rem;
	color: var(--mg-green-dark);
	margin: 22px 0 14px;
	text-align: center;
}

.mg-reco__step[data-step="1"] .mg-reco__question {
	margin-top: 0;
}

/* ---------- Options ---------- */
.mg-reco__options {
	display: grid;
	gap: 12px;
}

.mg-reco__options--2 {
	grid-template-columns: repeat(2, 1fr);
}

.mg-reco__options--3 {
	grid-template-columns: repeat(3, 1fr);
}

.mg-reco__options--grid {
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.mg-reco__option {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: 60px;
	padding: 14px 16px;
	background: #fff;
	border: 2px solid var(--mg-border);
	border-radius: 16px;
	cursor: pointer;
	font-weight: 600;
	transition: border-color 0.2s ease, background 0.2s ease, transform 0.1s ease;
}

.mg-reco__option:hover {
	border-color: var(--mg-green-dark);
}

.mg-reco__option:active {
	transform: scale(0.99);
}

.mg-reco__radio {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.mg-reco__radio:checked + .mg-reco__option-label {
	color: var(--mg-green-dark);
}

.mg-reco__option:has(.mg-reco__radio:checked) {
	border-color: var(--mg-green-dark);
	background: var(--mg-green-light);
}

.mg-reco__radio:focus-visible + .mg-reco__option-label {
	outline: 2px solid var(--mg-orange);
	outline-offset: 4px;
}

/* ---------- Navigation ---------- */
.mg-reco__nav {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-top: 28px;
	flex-wrap: wrap;
}

.mg-reco__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 2px solid transparent;
	border-radius: 100px;
	padding: 14px 28px;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.mg-reco__btn--primary {
	background: var(--mg-orange);
	color: #fff;
}

.mg-reco__btn--primary:hover {
	background: #e0951f;
}

.mg-reco__btn--primary[disabled] {
	background: var(--mg-border);
	color: #3B515E;
	cursor: not-allowed;
}

.mg-reco__btn--ghost {
	background: transparent;
	color: var(--mg-green-dark);
	border-color: var(--mg-green-dark);
}

.mg-reco__btn--ghost:hover {
	background: var(--mg-green-dark);
	color: #fff;
}

/* ---------- Résultat ---------- */
.mg-reco__result {
	text-align: center;
}

.mg-reco__result-title {
	font-family: "LEMON MILK", "Lato", Arial, sans-serif;
	font-size: clamp(1.3rem, 3vw, 2rem);
	color: var(--mg-green-dark);
	margin: 0 0 12px;
}

.mg-reco__result-lead {
	max-width: 680px;
	margin: 0 auto 22px;
}

.mg-reco__summary {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	padding: 0;
	margin: 0 0 28px;
}

.mg-reco__summary-item {
	background: var(--mg-green-light);
	color: var(--mg-green-dark);
	border-radius: 100px;
	padding: 6px 16px;
	font-weight: 600;
	font-size: 0.9rem;
}

.mg-reco__cards {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 20px;
	margin-bottom: 32px;
}

.mg-reco__card {
	background: #fff;
	border: 1px solid var(--mg-border);
	border-radius: 20px;
	padding: 22px;
	max-width: 420px;
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
}

.mg-reco__card-media {
	width: 100%;
	display: flex;
	justify-content: center;
}

.mg-reco__card-img {
	max-width: 100%;
	height: auto;
	max-height: 280px;
	object-fit: contain;
}

.mg-reco__card-name {
	font-family: "LEMON MILK", "Lato", Arial, sans-serif;
	font-size: 1.15rem;
	color: var(--mg-green-dark);
	margin: 0;
}

.mg-reco__extras {
	list-style: none;
	padding: 0;
	margin: 8px 0 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.mg-reco__extra a {
	color: var(--mg-green-dark);
	font-weight: 600;
	text-decoration: underline;
}

.mg-reco__extra a:hover {
	color: var(--mg-orange);
}

.mg-reco__empty {
	background: var(--mg-green-light);
	border-radius: 16px;
	padding: 24px;
	max-width: 520px;
	margin: 0 auto;
	color: var(--mg-green-dark);
	font-weight: 600;
}

/* ---------- Conseiller ---------- */
.mg-reco__advisor {
	background: var(--mg-green-dark);
	color: #fff;
	border-radius: 20px;
	padding: clamp(22px, 4vw, 36px);
	margin-bottom: 22px;
}

.mg-reco__advisor-title {
	font-family: "LEMON MILK", "Lato", Arial, sans-serif;
	font-size: 1.25rem;
	margin: 0 0 10px;
}

.mg-reco__advisor-text {
	max-width: 600px;
	margin: 0 auto 16px;
	color: rgba(255, 255, 255, 0.92);
}

.mg-reco__phone {
	display: inline-block;
	font-size: 1.6rem;
	font-weight: 800;
	color: var(--mg-orange);
	text-decoration: none;
}

.mg-reco__phone:hover {
	text-decoration: underline;
}

.mg-reco__restart {
	display: flex;
	justify-content: center;
	margin-bottom: 22px;
}

.mg-reco__advisor .mg-reco__btn--ghost:hover {
	background: #fff;
	color: var(--mg-green-dark);
}

.mg-reco__caution {
	font-size: 0.85rem;
	color: #3B515E;
	max-width: 720px;
	margin: 0 auto;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
	.mg-reco__progress {
		gap: 6px;
	}

	.mg-reco__progress-btn {
		padding: 8px 4px;
		font-size: 0.68rem;
	}

	.mg-reco__progress-num {
		width: 24px;
		height: 24px;
		font-size: 0.8rem;
	}

	.mg-reco__options--3 {
		grid-template-columns: 1fr;
	}

	.mg-reco__nav {
		flex-direction: column-reverse;
	}

	.mg-reco__btn {
		width: 100%;
	}
}
