/* Tips Recettes — carte recette (reprend le rendu du thème Extra) */
.tr-card { --tr-accent: #c3004e; margin-top: 20px; scroll-margin-top: 140px; }
.tr-jump { margin: 0 0 14px; font-size: 15px; }
.tr-jump a { font-weight: bold; }

/* Infos */
.tr-infos { font-size: 15px; line-height: 1.8; }
.tr-yield { display: flex; align-items: center; gap: 10px; }
.tr-adjust { display: inline-flex; border: 1px solid #ddd; border-radius: 99px; overflow: hidden; }
.tr-adjust button { border: 0; background: #fff; width: 28px; height: 24px; line-height: 1; cursor: pointer; font-size: 16px; color: #333; padding: 0; }
.tr-adjust button:hover { background: var(--tr-accent); color: #fff; }
.tr-rating-line { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.tr-rating-text { font-size: 13px; color: #777; }
.tr-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; font-size: 14px; }
.tr-print { background: none; border: 0; padding: 0; color: var(--tr-accent); cursor: pointer; font: inherit; text-decoration: underline; }

/* Étoiles (affichage) */
.tr-stars { display: inline-flex; gap: 2px; }
.tr-star { width: 16px; height: 16px; background: linear-gradient(90deg, var(--tr-accent) var(--fill), #d6d6d6 var(--fill)); -webkit-mask: var(--tr-star-mask) center / contain no-repeat; mask: var(--tr-star-mask) center / contain no-repeat; }
.tr-card, .tr-rate { --tr-star-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l2.9 6.9 7.1.6-5.4 4.7 1.6 7L12 17.5 5.8 21.2l1.6-7L2 9.5l7.1-.6z'/%3E%3C/svg%3E"); }

/* Titre et listes */
.tr-card .nom-recette { padding-bottom: 0; }
.tr-card .lib-ingredients, .tr-card .lib-instructions, .tr-card .lib-astuces { display: block; font-weight: bold; margin-bottom: 8px; }
.tr-card .liste-ingredients.tr-has-photo { gap: 24px; }
@media (min-width: 768px) {
	.tr-card .liste-ingredients { flex-direction: row-reverse; align-items: flex-start; }
	.tr-card .liste-ingredients .ingredients { flex: 1 1 auto; margin: 0; }
	.tr-card .liste-ingredients .photo-ingredients { flex: 0 0 auto; max-width: 40%; margin: 0; }
}
@media (max-width: 767px) {
	.tr-card .liste-ingredients { display: flex; flex-direction: column-reverse; }
	.tr-card .liste-ingredients .photo-ingredients { margin: 16px auto 0; max-width: 80%; }
}
.tr-card .photo-ingredients figure { margin: 0; }
.tr-card .photo-ingredients img { height: auto; }
.tr-card .tr-group { font-size: 16px; margin: 14px 0 6px; padding: 0; color: var(--tr-accent); }
.tr-card ul.tr-ing-list { list-style: none; padding: 0 !important; margin: 0 0 6px; }
.tr-card ul.tr-ing-list li { padding: 3px 0; list-style: none !important; margin-left: 0 !important; }
.tr-card ul.tr-ing-list li::before { content: none !important; }
.tr-card ul.tr-ing-list label { cursor: pointer; display: flex; gap: 8px; align-items: baseline; }
.tr-check { accent-color: var(--tr-accent); flex: none; position: relative; top: 1px; }
.tr-check:checked + .tr-ing { text-decoration: line-through; opacity: .5; }
.tr-q { font-weight: bold; }
.tr-note { color: #777; }

/* Étapes */
.tr-card ol.tr-steps { padding-left: 1.4em !important; margin: 0 0 10px; }
.tr-card ol.tr-steps li { padding: 4px 0 8px; }
.tr-step-title { color: #000; }
.tr-step-img { margin: 10px 0 0; }
.tr-step-img img { height: auto; max-width: 100%; }
.tr-step-gallery { display: grid; grid-template-columns: repeat(var(--cols, 2), 1fr); gap: 8px; margin-top: 10px; }
@media (max-width: 600px) { .tr-step-gallery { grid-template-columns: repeat(2, 1fr); } }
.tr-step-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.tr-notes { border-top: 1px solid #000; margin-top: 20px; padding-top: 20px; }
.tr-free { margin: 10px 0; }

/* Notation */
.tr-rate { border-top: 1px solid #000; margin-top: 20px; padding-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tr-rate-title { font-weight: bold; }
.tr-rate-stars { display: inline-flex; gap: 4px; }
.tr-rate-star { width: 28px; height: 28px; border: 0; padding: 0; cursor: pointer; background: #d6d6d6; -webkit-mask: var(--tr-star-mask) center / contain no-repeat; mask: var(--tr-star-mask) center / contain no-repeat; }
.tr-rate-star.is-on { background: var(--tr-accent); }
.tr-rate-msg { font-size: 14px; color: #555; }

/* Agrandissement des photos */
.tr-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 999999; cursor: zoom-out; }
.tr-lightbox img { max-width: 94vw; max-height: 92vh; box-shadow: 0 8px 40px rgba(0,0,0,.5); }

/* Impression : uniquement la recette */
@media print {
	body.tr-printing * { visibility: hidden !important; }
	body.tr-printing .tr-card, body.tr-printing .tr-card * { visibility: visible !important; }
	body.tr-printing .tr-card { position: absolute; left: 0; top: 0; width: 100%; }
	body.tr-printing .tr-adjust, body.tr-printing .tr-actions, body.tr-printing .tr-rate, body.tr-printing .tr-check, body.tr-printing .tr-free.tr-after { display: none !important; }
	body.tr-printing .tr-step-gallery, body.tr-printing .tr-step-img { display: none !important; }
}
