/* PâtiSwap — Recettes. S'appuie sur les jetons et composants des guides (guides.css). */

.psrec-fiche, .psrec-fiche *, .psrec-inguide, .psrec-inguide *, .psrec-editor * { box-sizing: border-box; }

/* ---------- Cartes ---------- */
.psrec-grid { display: grid; gap: 24px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.psrec-card {
	position: relative; display: flex; flex-direction: column; min-width: 0;
	background: #fff; border: 1px solid var(--psg-line); border-radius: var(--psg-radius);
	box-shadow: var(--psg-shadow); overflow: hidden; transition: box-shadow .2s, transform .2s;
}
.psrec-card:hover { box-shadow: var(--psg-shadow-lg); transform: translateY(-2px); }
.psrec-card:focus-within { outline: 3px solid var(--psg-amber); outline-offset: 2px; }
.psrec-card__media { position: relative; aspect-ratio: 4 / 3; background: var(--psg-cream); }
.psrec-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.psrec-card__picto { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; color: var(--psg-amber); background: linear-gradient(135deg, var(--psg-cream), var(--psg-peach)); }
.psrec-picto { width: 64px; height: 64px; }
.psrec-card__body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; }
.psrec-card__title { margin: 0 !important; font-family: var(--psg-serif); font-weight: 600; font-size: 21px; line-height: 1.25; }
.psrec-card__link { color: var(--psg-ink) !important; text-decoration: none !important; }
.psrec-card__link::after { content: ""; position: absolute; inset: 0; }
.psrec-card__link:focus { outline: none; }
.psrec-card__meta { margin: 0 !important; font-size: 14px; color: var(--psg-muted); }

/* ---------- Pastilles de régime ---------- */
.psrec-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 !important; padding: 0; list-style: none; }
.psrec-tag { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--psg-green-bg); color: var(--psg-green); font-size: 13px; font-weight: 700; line-height: 1.4; }
.psrec-tags--card .psrec-tag { font-size: 12px; padding: 2px 9px; }

/* ---------- En-tête de recette ---------- */
.psrec-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.psrec-facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 16px 0 0 !important; padding: 14px 0 0; list-style: none; border-top: 1px solid var(--psg-line); }
.psrec-facts li { display: flex; flex-direction: column; margin: 0; }
.psrec-facts__label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--psg-muted); }
.psrec-facts__value { font-size: 17px; font-weight: 600; color: var(--psg-ink); }
.psrec-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0 !important; }
.psrec-print { cursor: pointer; font: inherit; }
.psrec-body { max-width: 768px; padding-top: 8px; padding-bottom: 24px; }
.psrec-figure { margin: 0 0 28px; }
.psrec-figure img { width: 100%; height: auto; border-radius: var(--psg-radius); }

/* ---------- Substitution clé ---------- */
.psrec-key {
	margin: 0 0 28px; padding: 18px 20px; background: var(--psg-cream);
	border-left: 4px solid var(--psg-amber); border-radius: 0 var(--psg-radius) var(--psg-radius) 0;
}
.psrec-key p { margin: 0 0 6px !important; }
.psrec-key__eyebrow { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--psg-amber-dark); }
.psrec-key__pair { font-family: var(--psg-serif); font-size: 24px; font-weight: 600; color: var(--psg-ink); }
.psrec-key__pair a { color: var(--psg-ink) !important; }
.psrec-key__links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0 !important; }
.psrec-key__links a { font-weight: 600; color: var(--psg-amber-dark) !important; }

/* ---------- Bloc recette ---------- */
.psrec-recipe { display: grid; gap: 28px; margin: 8px 0 32px; scroll-margin-top: 120px; }
.psrec-recipe__ings { padding: 22px 22px 18px; background: #fff; border: 1px solid var(--psg-line); border-radius: var(--psg-radius); box-shadow: var(--psg-shadow); }
.psrec-recipe__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.psg .psrec-recipe__title { margin: 0 !important; font-family: var(--psg-serif); font-size: 30px; font-weight: 600; color: var(--psg-ink); }
.psg .psrec-recipe__group { margin: 18px 0 6px !important; font-size: 15px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--psg-amber-dark); font-family: var(--psg-sans); }
.psrec-yield { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid var(--psg-line); border-radius: 999px; background: var(--psg-cream); }
.psrec-yield__btn {
	width: 36px; height: 36px; border-radius: 50%; border: 0; background: #fff; color: var(--psg-amber-dark);
	font-size: 20px; font-weight: 700; line-height: 1; cursor: pointer; box-shadow: var(--psg-shadow);
}
.psrec-yield__btn:hover, .psrec-yield__btn:focus-visible { background: var(--psg-amber); color: #fff; }
.psrec-yield__btn:focus-visible { outline: 3px solid var(--psg-amber); outline-offset: 2px; }
.psrec-yield__value { min-width: 84px; padding: 0 6px; text-align: center; font-weight: 600; color: var(--psg-ink); }
.psrec-ings { margin: 0 !important; padding: 0; list-style: none; }
.psrec-ing { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 9px 0; border-top: 1px dashed #e8cfae; }
.psrec-ing:first-child { border-top: 0; }
.psrec-ing__check { flex: 0 0 auto; width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--psg-amber); cursor: pointer; }
.psrec-ing__text { cursor: pointer; line-height: 1.5; }
.psrec-ing__qty { color: var(--psg-ink); white-space: nowrap; }
.psrec-ing__name a { color: var(--psg-amber-dark) !important; text-decoration: underline; text-decoration-color: var(--psg-peach); text-underline-offset: 3px; }
.psrec-ing__note { color: var(--psg-muted); }
.psrec-ing__check:checked + .psrec-ing__text { color: var(--psg-muted); text-decoration: line-through; }
.psrec-allergens { margin: 14px 0 0 !important; padding-top: 12px; border-top: 1px solid var(--psg-line); font-size: 14px; color: var(--psg-muted); }
.psrec-steps { counter-reset: psrec-step; margin: 12px 0 0 !important; padding: 0 !important; list-style: none !important; }
.psrec-step { position: relative; counter-increment: psrec-step; margin: 0 0 18px !important; padding-left: 52px; }
.psrec-step::before {
	content: counter(psrec-step); position: absolute; left: 0; top: 0;
	width: 36px; height: 36px; border-radius: 50%; background: var(--psg-amber); color: #fff;
	display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px;
}
.psrec-step p { margin: 0 !important; font-size: 17px; line-height: 1.65; padding-top: 5px; }

/* ---------- Encadrés de fin ---------- */
.psrec-testnote { display: flex; align-items: center; gap: 8px; margin: 20px 0 !important; font-weight: 600; color: var(--psg-amber-dark); }
.psrec-variants { margin: 36px 0 0; }
.psrec-variants__intro { color: var(--psg-muted); }
.psrec-variants__list { list-style: none; margin: 8px 0 0 !important; padding: 0; }
.psrec-related, .psrec-single .psg-related { margin: 48px 0; }

/* ---------- Accueil et pages régime ---------- */
.psrec-hero .psg-breadcrumb { margin-bottom: 18px; }
.psrec-hero .psg-breadcrumb, .psrec-hero .psg-breadcrumb a, .psrec-hero .psg-breadcrumb span { color: var(--psg-peach) !important; }
.psrec-intro { max-width: 760px; margin: 0 auto; color: #fff; font-size: 17px; }
.psrec-intro a { color: var(--psg-peach) !important; font-weight: 600; }
.psrec-regimes { margin: 32px 0 20px; }
.psrec-regimes ul { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.psrec-regime {
	display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 14px 16px; border-radius: 14px;
	background: var(--psg-cream); border: 1px solid var(--psg-line); color: var(--psg-ink) !important; text-decoration: none !important;
}
.psrec-regime:hover, .psrec-regime.is-current { border-color: var(--psg-amber); background: #fff; box-shadow: var(--psg-shadow); }
.psrec-regime__name { font-weight: 700; }
.psrec-regime__count { font-size: 14px; color: var(--psg-muted); }
.psrec-preps { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px !important; padding: 0; list-style: none; }
.psrec .psg-chip.is-active { background: var(--psg-amber); border-color: var(--psg-amber); color: #fff !important; }
.psrec-list { margin-bottom: 56px; }
.psrec-empty { padding: 32px; text-align: center; background: var(--psg-cream); border-radius: var(--psg-radius); }

/* ---------- Fiches ingrédients et guides ---------- */
.psrec-fiche { margin: 48px 0; }
.psrec-fiche h2 { font-family: var(--psg-serif); }
.psrec-fiche__intro { color: var(--psg-muted); }
.psrec-fiche__all { margin-top: 16px; font-weight: 600; }
.psrec-inguide { margin: 48px 0; }

/* ---------- Éditeur ---------- */
.psrec-editor { padding: 16px; border: 1px dashed var(--psg-amber, #9A690F); border-radius: 12px; background: #fffaf5; }
.psrec-editor__title { font-weight: 700; margin: 0 0 10px; }
.psrec-editor textarea { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.psrec-regimes ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
	.psrec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	.psrec-grid { grid-template-columns: 1fr; gap: 16px; }
	.psrec-card { flex-direction: row; }
	.psrec-card__media { flex: 0 0 104px; aspect-ratio: auto; min-height: 104px; }
	.psrec-picto { width: 44px; height: 44px; }
	.psrec-card .psg-seal--card { display: none; }
	.psrec-card__body { padding: 12px 14px; }
	.psrec-card__title { font-size: 18px; }
	.psrec-regimes { margin: 20px 0 16px; overflow-x: auto; }
	.psrec-regimes ul { display: flex; gap: 8px; }
	.psrec-regimes li { flex: 0 0 auto; }
	.psrec-regime { padding: 10px 14px; }
	.psrec-recipe__ings { padding: 16px 14px 12px; }
	.psg .psrec-recipe__title { font-size: 26px; }
	.psrec-step { padding-left: 46px; }
	.psrec-step p { font-size: 17px; }
	.psrec-facts { gap: 10px 20px; }
	.psrec-key__pair { font-size: 21px; }
	.psrec-actions .psg-btn { flex: 1 1 auto; justify-content: center; }
}

/* ---------- Impression ---------- */
@media print {
	.site-header, .site-footer, #masthead, #colophon, .psrec-noprint, .psg-breadcrumb, .psrec-yield__btn, .psrec-ing__check, .psrec-figure, .psrec-key__links, .cmplz-cookiebanner, .cmplz-manage-consent { display: none !important; }
	.psg, .psrec { background: #fff !important; color: #000 !important; }
	.psrec-recipe__ings { box-shadow: none; border: 1px solid #999; }
	.psrec-step::before { background: #fff; color: #000; border: 1px solid #000; }
	.psrec-card:hover { transform: none; }
	a { color: #000 !important; text-decoration: none !important; }
	.psrec-single::after { content: "Recette imprimée depuis patiswap.fr"; display: block; margin-top: 24px; font-size: 12px; }
}

/* ---------- En-tête des pages recettes (v2) ---------- */
.psrec-hero2 {
	position: relative; overflow: hidden; text-align: center;
	padding: 56px 0 36px; border-bottom: 1px solid var(--psg-line);
	background:
		radial-gradient(circle at 12% 20%, rgba(255, 224, 193, .9), transparent 42%),
		radial-gradient(circle at 88% 85%, rgba(255, 224, 193, .75), transparent 45%),
		var(--psg-cream);
}
.psrec-hero2__inner { max-width: 880px; }
.psrec-back { display: inline-flex; gap: 6px; margin-bottom: 18px; font-size: 15px; font-weight: 600; color: var(--psg-amber-dark) !important; text-decoration: none !important; }
.psrec-back:hover { text-decoration: underline !important; }
.psrec-hero2__pictos { display: flex; justify-content: center; gap: 10px; margin-bottom: 18px; }
.psrec-hero2__picto {
	display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px;
	border-radius: 50%; background: #fff; color: var(--psg-amber); box-shadow: var(--psg-shadow);
}
.psrec-hero2__picto:nth-child(2n) { transform: translateY(6px); }
.psrec-hero2__picto .psrec-picto { width: 28px; height: 28px; }
.psg .psrec-hero2__title {
	margin: 0 auto 14px !important; max-width: 760px; font-family: var(--psg-serif); font-weight: 600;
	font-size: 50px; line-height: 1.08; color: var(--psg-ink); letter-spacing: -.01em;
}
.psrec-hero2__sub { max-width: 640px; margin: 0 auto 26px !important; font-size: 18px; color: var(--psg-muted); }
.psrec-hero2 .psrec-intro { color: var(--psg-text); font-size: 17px; text-align: left; max-width: 720px; }
.psrec-hero2 .psrec-intro a { color: var(--psg-amber-dark) !important; }
.psrec-hero2 .psrec-regimes { margin: 0; }
.psrec-hero2 .psrec-regimes ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.psrec-hero2 .psrec-regime {
	flex-direction: row; align-items: center; gap: 8px; height: auto; padding: 8px 8px 8px 16px;
	border-radius: 999px; background: #fff; box-shadow: var(--psg-shadow);
}
.psrec-hero2 .psrec-regime__count {
	min-width: 26px; height: 26px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center;
	border-radius: 999px; background: var(--psg-green-bg); color: var(--psg-green); font-weight: 700; font-size: 13px;
}
.psrec-hero2 .psrec-regime.is-current { background: var(--psg-amber); border-color: var(--psg-amber); color: #fff !important; }
.psrec-hero2 .psrec-regime.is-current .psrec-regime__count { background: rgba(255, 255, 255, .25); color: #fff; }
.psrec-archive__body { padding-top: 28px; }
@media (max-width: 767px) {
	.psrec-hero2 { padding: 28px 0 22px; }
	.psrec-hero2__pictos { gap: 8px; margin-bottom: 12px; }
	.psrec-hero2__picto { width: 38px; height: 38px; }
	.psrec-hero2__picto .psrec-picto { width: 22px; height: 22px; }
	.psg .psrec-hero2__title { font-size: 31px; }
	.psrec-hero2__sub { font-size: 16px; margin-bottom: 18px !important; }
	.psrec-hero2 .psrec-intro { font-size: 16px; }
	.psrec-hero2 .psrec-regimes { margin: 0 -16px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
	.psrec-hero2 .psrec-regimes::-webkit-scrollbar { display: none; }
	.psrec-hero2 .psrec-regimes ul { flex-wrap: nowrap; justify-content: flex-start; padding: 4px 16px 8px; }
	.psrec-hero2 .psrec-regimes li { flex: 0 0 auto; }
	.psrec-archive__body { padding-top: 20px; }
}