/*
 * Page recette (/recettes/slug-ID) — préfixe rp-. Vue : app/views/recipe/page.php, comportement : static/js/pages/recipe.js.
 * Uniquement des tokens du design system (static/css/ds/tokens.css) : le mode sombre suit tout seul.
 * Mobile d'abord. Les titres posés dans un lien ou un bouton ont une font-family explicite (g-style force Poppins sur *).
 */

.rp {
  --rp-top: 0px;              /* bas de l'en-tête du site (mis à jour par recipe.js quand l'en-tête se cache) */
  --rp-star: #f2a516;
  --rp-heart: #e5384f;
  --rp-prot: #3d7be0;
  --rp-carbs: #e0a12b;
  --rp-fat: #e0603c;
  --rp-fiber: #2f8a55;
  --rp-gut: 14px;             /* marge latérale de la page (le ds-shell n'en ajoute plus) */
  padding: 0 0 96px;
  overflow-x: clip;
}
@media (min-width: 600px) { .rp { --rp-gut: 24px; } }
@media (min-width: 1280px) { .rp { --rp-gut: 40px; } }
.dark-mode .rp { --rp-star: #ffc14d; }
.rp *, .rp *::before, .rp *::after { box-sizing: border-box; }
.rp-wrap { max-width: 1480px; margin: 0 auto; padding: 12px var(--rp-gut) 0; }
.rp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rp-muted { color: var(--ds-text-3); font-size: var(--ds-text-sm); font-weight: 500; }
.rp-link {
  display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--ds-primary-text); font: 600 var(--ds-text-sm) var(--ds-font-body); text-decoration: none;
}
.rp-link:hover { text-decoration: underline; }
.rp-h2 { margin: 0; font: 600 clamp(1.25rem, 3.6vw, 1.6rem)/1.25 var(--ds-font-display); color: var(--ds-text); letter-spacing: -0.01em; }
.rp-h3 { margin: 0 0 8px; font: 600 1.02rem/1.35 var(--ds-font-display); color: var(--ds-text); }
.rp-card {
  background: var(--ds-surface); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-lg);
  padding: 18px 16px; box-shadow: var(--ds-shadow-sm);
}
@media (min-width: 600px) { .rp-card { padding: 22px 24px; } }
.rp-card__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 16px; }
.rp-section { margin-top: 44px; }
@media (min-width: 960px) { .rp-section { margin-top: 56px; } }
.rp-section > .rp-h2 { margin-bottom: 16px; }

/* ---------------- Fil d'Ariane ---------------- */
.rp-crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 0 0 12px; padding: 0; list-style: none; font-size: var(--ds-text-xs); color: var(--ds-text-3); }
.rp-crumbs li { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.rp-crumbs li + li::before { content: "›"; color: var(--ds-border-strong); }
.rp-crumbs a { color: var(--ds-text-2); text-decoration: none; font-weight: 500; }
.rp-crumbs a:hover { color: var(--ds-primary-text); text-decoration: underline; }
.rp-crumbs [aria-current] { max-width: 52vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- En-tête de la recette ---------------- */
.rp-hero { display: grid; gap: 20px; }
.rp-hero__media { position: relative; margin: 0; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--ds-radius-md); background: var(--ds-surface-2); }
.rp-hero__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rp-hero__noimg { display: grid; place-items: center; width: 100%; height: 100%; color: var(--ds-text-3); font-size: 3rem; }
.rp-hero__fav {
  position: absolute; top: 14px; right: 14px; width: 46px; height: 46px; border: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; font-size: 1.4rem; color: var(--rp-heart); background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16); transition: transform var(--ds-duration) var(--ds-ease);
}
.rp-heart { display: grid; place-items: center; }
.rp-hero__fav:hover { transform: scale(1.06); }
.rp-hero__diets { position: absolute; right: 12px; bottom: 12px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: calc(100% - 24px); }
/* mêmes couleurs que les badges des cartes de recettes (--c posé par la vue) */
.rp-diet {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px 5px 8px; border-radius: var(--ds-radius-pill);
  font: 600 0.72rem/1.2 var(--ds-font-body); color: var(--c); background: color-mix(in srgb, var(--c) 7%, #fff);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 4px 14px rgba(0, 0, 0, 0.1);
}
.rp-diet .cb-icon { font-size: 1.05em; }

.rp-eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 8px; font-size: var(--ds-text-sm); color: var(--ds-text-3); font-weight: 500; }
.rp-eyebrow a { color: var(--ds-primary-text); text-decoration: none; font-weight: 600; }
.rp-eyebrow a:hover { text-decoration: underline; }
.rp-title { margin: 0; font: 500 clamp(1.6rem, 5.6vw, 2.4rem)/1.15 var(--ds-font-display); color: var(--ds-text); letter-spacing: -0.02em; overflow-wrap: anywhere; }

.rp-rating { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 12px; }
.rp-rating__link { display: inline-flex; align-items: center; gap: 8px; color: var(--ds-text); text-decoration: none !important; font-size: var(--ds-text-sm); }
.rp-rating__link strong { font-weight: 700; }
.rp-rating__count { color: var(--ds-text-2); }
.rp-rating__link:hover .rp-rating__count { color: var(--ds-primary-text); }
.rp-rating__favs { font-size: var(--ds-text-sm); color: var(--ds-text-2); }
.rp-rating__favs .cb-icon { color: var(--rp-heart); }
.rp-stars { display: inline-flex; gap: 2px; color: var(--ds-border-strong); font-size: 0.95rem; }
.rp-stars .is-on { color: var(--rp-star); }
.rp-stars--sm { font-size: 0.8rem; }

.rp-desc { margin-top: 14px; }
.rp-desc__text { margin: 0; color: var(--ds-text-2); font-size: 1rem; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.rp-desc__text.is-open { display: block; -webkit-line-clamp: unset; }
.rp-desc .rp-link { margin-top: 6px; }

.rp-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 10px; margin: 20px 0 0; padding: 16px 0; border-block: 1px solid var(--ds-border); }
.rp-fact { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 10px; align-items: center; margin: 0; min-width: 0; }
.rp-fact__ico { grid-column: 1; grid-row: 1 / span 2; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ds-primary-soft); color: var(--ds-primary-text); font-size: 1.15rem; }
.rp-fact dd { grid-column: 2; grid-row: 1; margin: 0; font: 700 0.98rem/1.2 var(--ds-font-body); color: var(--ds-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-fact dt { grid-column: 2; grid-row: 2; font-size: var(--ds-text-xs); line-height: 1.25; color: var(--ds-text-3); font-weight: 500; }
@media (max-width: 420px) {
  .rp-facts { column-gap: 6px; }
  .rp-fact { grid-template-columns: 30px minmax(0, 1fr); column-gap: 8px; }
  .rp-fact__ico { width: 30px; height: 30px; font-size: 1rem; }
}

/* Mode cuisine + actions rapides (icônes rondes, libellé en bulle au survol) */
.rp-actions { display: flex; align-items: center; gap: 8px; margin-top: 18px; }
.rp-actions__cook { flex: 1; min-width: 0; padding-inline: 12px; white-space: nowrap; }
.rp-qa {
  position: relative; flex: none; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%;
  background: var(--ds-surface-2); color: var(--ds-text); font-size: 1.3rem; text-decoration: none; cursor: pointer;
  transition: background var(--ds-duration), color var(--ds-duration), transform var(--ds-duration) var(--ds-ease);
}
.rp-qa:hover { background: var(--ds-primary-soft); color: var(--ds-primary-text); }
.rp-qa:active { transform: scale(0.94); }
.rp-qa[data-rp-fav], .rp-dock__btn[data-rp-fav] { color: var(--rp-heart); }
.rp-qa.is-on, .rp-qa.is-on:hover { background: #ffe4e8; color: var(--rp-heart); }
.dark-mode .rp-qa.is-on { background: rgba(229, 56, 79, 0.18); }
.rp-qa::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); padding: 6px 10px; border-radius: 9px; white-space: nowrap;
  background: var(--ds-text); color: var(--ds-surface); font: 600 0.72rem var(--ds-font-body);
  opacity: 0; transform: translate(-50%, 4px); pointer-events: none; transition: opacity 0.15s, transform 0.15s;
}
@media (max-width: 420px) { .rp-actions { gap: 6px; } .rp-qa { width: 44px; height: 44px; font-size: 1.2rem; } }
@media (hover: hover) { .rp-qa:hover::after, .rp-qa:focus-visible::after { opacity: 1; transform: translate(-50%, 0); } }
.rp-byline { display: flex; align-items: center; gap: 10px; margin: 16px 0 0; font-size: var(--ds-text-sm); color: var(--ds-text-3); }
.rp-byline img { border-radius: 50%; }
.rp-byline strong { color: var(--ds-text-2); font-weight: 600; }

@media (min-width: 960px) {
  .rp-wrap { padding-top: 20px; }
  .rp-hero { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 48px; align-items: start; }
  .rp-hero__media { margin: 0; border-radius: var(--ds-radius-lg); box-shadow: var(--ds-shadow-md); position: sticky; top: calc(var(--rp-top) + 16px); }
  .rp-hero__body { padding-top: 6px; }
}

/* ---------------- Compatibilité avec le profil ---------------- */
.rp-compat {
  display: flex; align-items: center; gap: 14px; width: 100%; margin: 24px 0 0; padding: 16px 18px; border-radius: var(--ds-radius-md);
  border: 1px solid var(--ds-border); background: var(--ds-surface); color: var(--ds-text); text-align: left; text-decoration: none; cursor: pointer;
  font: inherit; transition: border-color var(--ds-duration), box-shadow var(--ds-duration);
}
a.rp-compat:hover, button.rp-compat:hover { border-color: var(--ds-primary); box-shadow: var(--ds-shadow-sm); }
.rp-compat__icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--ds-primary-soft); color: var(--ds-primary-text); font-size: 1.15rem; }
.rp-compat__text { flex: 1; display: grid; gap: 2px; font-size: var(--ds-text-sm); color: var(--ds-text-2); line-height: 1.45; }
.rp-compat__text strong { color: var(--ds-text); font-size: 0.95rem; }
.rp-compat > .cb-icon { color: var(--ds-text-3); }
.rp-compat--alert { cursor: default; border-color: transparent; background: var(--ds-warning-soft); }
.rp-compat--alert .rp-compat__icon { background: var(--ds-warning); color: #fff; }
.rp-compat--ok { cursor: default; border-color: transparent; background: var(--ds-success-soft); }
.rp-compat--ok .rp-compat__icon { background: var(--ds-success); color: #fff; }

/* ---------------- Menu de la page ---------------- */
.rp-tabs {
  position: sticky; top: var(--rp-top); z-index: 40; display: flex; gap: 4px; margin: 28px calc(-1 * var(--rp-gut)) 0; padding: 0 var(--rp-gut);
  overflow-x: auto; scrollbar-width: none; background: color-mix(in srgb, var(--ds-bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--ds-border);
}
.rp-tabs::-webkit-scrollbar { display: none; }
.rp-tabs a {
  flex: none; position: relative; padding: 14px 12px; color: var(--ds-text-2); text-decoration: none; white-space: nowrap;
  font: 600 var(--ds-text-sm) var(--ds-font-body);
}
.rp-tabs a span { color: var(--ds-text-3); font-weight: 500; }
.rp-tabs a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: transparent; transition: background var(--ds-duration); }
.rp-tabs a:hover { color: var(--ds-text); }
.rp-tabs a.is-active { color: var(--ds-primary-text); }
.rp-tabs a.is-active::after { background: var(--ds-primary); }
@media (min-width: 960px) { .rp-tabs { margin: 32px 0 0; padding: 0; } }
.rp [id] { scroll-margin-top: calc(var(--rp-top) + 64px); }

/* ---------------- Ingrédients ---------------- */
.rp-cook { display: grid; gap: 44px; margin-top: 20px; }
@media (min-width: 1024px) {
  .rp-cook { grid-template-columns: 410px minmax(0, 1fr); gap: 48px; margin-top: 28px; align-items: start; }
  /* collante seulement si elle tient entière à l'écran (classe posée par recipe.js) : jamais de défilement dans la carte */
  .rp-ings.is-sticky { position: sticky; top: calc(var(--rp-top) + 64px); }
}
.rp-count {
  display: inline-grid; place-items: center; min-width: 1.7em; height: 1.7em; margin-left: 4px; padding: 0 6px; border-radius: var(--ds-radius-pill);
  background: var(--ds-surface-2); color: var(--ds-text-2); font: 600 0.8rem/1 var(--ds-font-body); vertical-align: 0.3em; letter-spacing: 0;
}
/* Portions : une barre douce, − et + en boutons blancs, le nombre bien lisible au centre */
.rp-servings { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: var(--ds-radius-md); background: var(--ds-surface-2); }
.rp-servings__btn {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--ds-surface); color: var(--ds-text); font-size: 0.85rem; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  transition: color var(--ds-duration), transform var(--ds-duration) var(--ds-ease);
}
.rp-servings__btn:hover { color: var(--ds-primary-text); }
.rp-servings__btn:active { transform: scale(0.92); }
.rp-servings__value { flex: 1; min-width: 0; display: flex; align-items: baseline; justify-content: center; gap: 6px; cursor: text; color: var(--ds-text-2); font-size: 0.95rem; font-weight: 500; }
.rp-servings__value input {
  width: 2.2ch; padding: 0; border: 0; background: none; text-align: right; color: var(--ds-text);
  font: 700 1.35rem/1 var(--ds-font-body); -moz-appearance: textfield;
}
.rp-servings__value input::-webkit-outer-spin-button, .rp-servings__value input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rp-servings__value input:focus { outline: none; }
.rp-servings:focus-within { box-shadow: 0 0 0 2px var(--ds-primary); }
.rp-cost { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 10px 2px 6px; font-size: var(--ds-text-sm); color: var(--ds-text-2); }
.rp-cost .cb-icon { color: var(--ds-text-3); }
.rp-cost strong { color: var(--ds-text); font-weight: 700; }

.rp-ings__group { margin: 18px 0 6px; font: 700 0.72rem var(--ds-font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ds-text-3); }
.rp-ings__list { list-style: none; margin: 0; padding: 0; }
.rp-ing + .rp-ing { border-top: 1px solid var(--ds-border); }
.rp-ing__row { display: flex; align-items: center; gap: 12px; margin: 0 -8px; padding: 9px 8px; border-radius: 12px; cursor: pointer; transition: background var(--ds-duration); }
@media (hover: hover) { .rp-ing__row:hover { background: var(--ds-surface-2); } }
/* Case ronde : cercle fin, puis pastille pleine avec la coche qui apparaît en rebondissant */
.rp-ing__check {
  flex: none; appearance: none; -webkit-appearance: none; position: relative; width: 26px; height: 26px; margin: 0; cursor: pointer;
  border: 2px solid var(--ds-border-strong); border-radius: 50%; background: var(--ds-surface);
  transition: background 0.18s, border-color 0.18s, transform 0.18s var(--ds-ease);
}
.rp-ing__row:hover .rp-ing__check { border-color: var(--ds-primary); }
.rp-ing__check::after {
  content: ""; position: absolute; left: 50%; top: 45%; width: 10px; height: 5px; border: solid #fff; border-width: 0 0 2.5px 2.5px;
  transform: translate(-50%, -50%) rotate(-45deg) scale(0); transition: transform 0.2s var(--ds-ease);
}
.rp-ing__check:checked { background: var(--ds-primary); border-color: var(--ds-primary); animation: rp-check 0.3s var(--ds-ease); }
.rp-ing__check:checked::after { transform: translate(-50%, -50%) rotate(-45deg) scale(1); }
.rp-ing__check:focus-visible { box-shadow: var(--ds-focus-ring); outline: none; }
@keyframes rp-check { 50% { transform: scale(1.15); } }
.rp-ing__img { flex: none; width: 40px; height: 40px; object-fit: contain; }
.rp-ing__text { flex: 1; min-width: 0; font-size: 0.95rem; line-height: 1.4; color: var(--ds-text); }
.rp-ing__qty { font-weight: 700; }
.rp-ing__info { display: block; color: var(--ds-text-3); font-size: var(--ds-text-xs); }
.rp-tag { display: inline-block; margin-left: 6px; padding: 2px 7px; border-radius: 7px; background: var(--ds-surface-2); color: var(--ds-text-3); font-size: 0.7rem; font-weight: 600; vertical-align: 1px; }
.rp-ing.is-done .rp-ing__text { color: var(--ds-text-3); text-decoration: line-through; text-decoration-color: var(--ds-border-strong); }
.rp-ing.is-done .rp-ing__img { opacity: 0.4; filter: grayscale(1); }
.rp-ings__list-btn { margin-top: 16px; }
.rp-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.rp-tool { display: grid; justify-items: center; align-content: start; gap: 8px; padding: 12px 6px 10px; border-radius: var(--ds-radius-md); background: var(--ds-surface-2); text-align: center; }
.rp-tool__img { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: #fff; overflow: hidden; color: var(--ds-text-3); }
.rp-tool__img img { width: 46px; height: 46px; object-fit: contain; }
.rp-tool__name { display: grid; gap: 1px; font-size: 0.8rem; line-height: 1.3; font-weight: 600; color: var(--ds-text); overflow-wrap: anywhere; }
.rp-tool__name small { font-size: 0.72rem; font-weight: 500; color: var(--ds-text-3); }
.rp-ings .rp-h3 { margin: 26px 0 12px; }

/* ---------------- Préparation ---------------- */
.rp-steps { min-width: 0; }
.rp-hint { margin: -6px 0 14px; font-size: var(--ds-text-xs); color: var(--ds-text-3); }
.rp-steps__list { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.rp-step { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--ds-border); }
.rp-step:first-child { padding-top: 4px; }
.rp-step__num {
  width: 40px; height: 40px; border: 0; border-radius: 50%; cursor: pointer; display: grid; place-items: center;
  background: var(--ds-primary-soft); color: var(--ds-primary-text); font: 700 1rem var(--ds-font-display);
  transition: background var(--ds-duration), color var(--ds-duration), transform var(--ds-duration) var(--ds-ease);
}
.rp-step__num:hover { transform: scale(1.06); }
.rp-step__text { padding-top: 7px; font-size: 1.04rem; line-height: 1.75; color: var(--ds-text); overflow-wrap: anywhere; }
@media (max-width: 599px) {
  .rp-step { grid-template-columns: 36px minmax(0, 1fr); gap: 12px; }
  .rp-step__num { width: 34px; height: 34px; font-size: 0.92rem; }
  .rp-step__text { padding-top: 4px; }
}
.rp-step__num .cb-icon { display: none; font-size: 1.1rem; }
.rp-step.is-done .rp-step__num { background: var(--ds-success); color: #fff; }
.rp-step.is-done .rp-step__n { display: none; }
.rp-step.is-done .rp-step__num .cb-icon { display: block; }
.rp-step.is-done .rp-step__text { color: var(--ds-text-3); }
.rp-timer {
  display: inline-flex; align-items: center; gap: 5px; margin: 0 1px; padding: 1px 8px; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--ds-accent-soft); color: var(--ds-accent-text); font: 700 0.95em/1.5 var(--ds-font-body); vertical-align: baseline;
  transition: background var(--ds-duration);
}
.rp-timer .cb-icon { font-size: 0.95em; }
.rp-timer:hover { background: color-mix(in srgb, var(--ds-accent-soft) 70%, var(--ds-accent)); }
.rp-timer.is-running { background: var(--ds-accent); color: var(--ds-on-accent); }

/* Mur d'inscription : la suite des étapes est floutée sous une carte d'invitation */
.rp-locked { position: relative; }
.rp-locked.is-locked .rp-steps__list {
  filter: blur(5px); opacity: 0.6; pointer-events: none; user-select: none; max-height: 260px; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 15%, transparent 92%); mask-image: linear-gradient(#000 15%, transparent 92%);
}
/* la carte recouvre le bas de l'aperçu flouté (on devine la suite) puis reprend le fil de la page : pas de grand vide */
.rp-wall {
  position: relative; z-index: 1; width: min(100%, 460px); margin: -170px auto 0; padding: 26px 22px 18px; text-align: center;
  background: var(--ds-surface); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-lg); box-shadow: var(--ds-shadow-lg);
  animation: rp-rise 0.5s var(--ds-ease) both;
}
.rp-locked:not(.is-locked) .rp-wall { display: none; }
.rp-wall__icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--ds-primary-soft); color: var(--ds-primary-text); font-size: 1.3rem; }
.rp-wall__title { margin: 12px 0 6px; font: 700 1.25rem/1.3 var(--ds-font-display); color: var(--ds-text); }
.rp-wall__text { margin: 0 auto; max-width: 36ch; color: var(--ds-text-2); font-size: 0.95rem; line-height: 1.55; }
.rp-wall__buttons { display: grid; gap: 10px; margin-top: 18px; }
.rp-wall__proof { margin: 12px 0 0; font-size: var(--ds-text-xs); color: var(--ds-text-3); }
.rp-wall__proof a { color: var(--ds-primary-text); font-weight: 600; }
.rp-wall__skip { margin-top: 10px; padding: 8px; border: 0; background: none; color: var(--ds-text-3); font: 500 var(--ds-text-xs) var(--ds-font-body); text-decoration: underline; cursor: pointer; }
.rp-benefits { display: grid; gap: 9px; margin: 14px 0 0; padding: 0; list-style: none; text-align: left; }
.rp-benefits li { display: flex; align-items: center; gap: 10px; font-size: 0.93rem; font-weight: 500; color: var(--ds-text); }
.rp-benefits__ico { flex: none; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--ds-primary-soft); color: var(--ds-primary-text); font-size: 1.05rem; }
.rp-wall .rp-benefits { max-width: 300px; margin: 14px auto 0; }
.ds-btn .rp-g { flex: none; }

.rp-done { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 20px; padding: 18px; border-radius: var(--ds-radius-md); background: var(--ds-success-soft); }
.rp-done[hidden] { display: none; }
.rp-done__icon { font-size: 1.6rem; color: var(--ds-success); }
.rp-done__title { margin: 0; font: 700 1.05rem var(--ds-font-display); }
.rp-done .rp-muted { margin: 2px 0 0; }
.rp-done .ds-btn { margin-left: auto; }

/* ---------------- Publicité ---------------- */
.rp .rp-ad { display: block; margin: 32px 0 0; padding: 12px; border-radius: var(--ds-radius-md); background: var(--ds-surface-2); min-height: 120px; text-align: center; overflow: hidden; }
/* g-style.min.css met .cookinbreak-ads-2 et .ads-show-cbn en flex centré : l'annonce y prenait une largeur nulle (« availableWidth=0 », pas de pub) */
.rp .rp-ad .ads-show-cbn { display: block; width: 100%; margin: 0; border-radius: 0; }
.rp .rp-ad ins.adsbygoogle { width: 100%; }
.rp .rp-ad[hidden] { display: none; }
.rp-ad__label { display: block; margin-bottom: 6px; font: 600 0.66rem var(--ds-font-body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ds-text-3); }

/* ---------------- Nutrition ---------------- */
.rp-nutri { display: flex; align-items: center; gap: 22px; }
/* Anneau : part des protéines, glucides et lipides dans les calories (--a et --b posés par la vue) */
.rp-donut {
  flex: none; position: relative; display: grid; place-items: center; width: 128px; height: 128px; border-radius: 50%;
  background: conic-gradient(var(--rp-prot) 0 var(--a), var(--rp-carbs) 0 var(--b), var(--rp-fat) 0 100%);
}
.rp-donut.is-empty { background: var(--ds-surface-2); }
.rp-donut::before { content: ""; position: absolute; inset: 13px; border-radius: 50%; background: var(--ds-surface); }
.rp-donut__value { position: relative; display: grid; justify-items: center; font-size: var(--ds-text-xs); font-weight: 600; color: var(--ds-text-3); line-height: 1.1; }
.rp-donut__value strong { font: 700 1.7rem/1 var(--ds-font-body); color: var(--ds-text); }
.rp-nutri__list { flex: 1; min-width: 0; margin: 0; padding: 0; list-style: none; }
.rp-macro { display: grid; grid-template-columns: minmax(0, 1fr) auto 3.4em; align-items: center; gap: 10px; padding: 9px 0; font-size: 0.95rem; }
.rp-macro + .rp-macro { border-top: 1px solid var(--ds-border); }
.rp-macro__name { display: inline-flex; align-items: center; gap: 9px; color: var(--ds-text-2); font-weight: 500; }
.rp-macro strong { color: var(--ds-text); font-weight: 700; }
.rp-macro__share { justify-self: end; color: var(--ds-text-3); font-size: var(--ds-text-xs); font-weight: 600; }
.rp-macro--prot { --c: var(--rp-prot); } .rp-macro--carbs { --c: var(--rp-carbs); } .rp-macro--fat { --c: var(--rp-fat); } .rp-macro--fiber { --c: var(--rp-fiber); }
.rp-dot { flex: none; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.rp-nutri__note { margin: 12px 0 0; font-size: var(--ds-text-xs); color: var(--ds-text-3); }
.rp-scores { display: flex; gap: 14px; align-items: center; }
@media (max-width: 519px) { .rp-scores { align-self: stretch; padding-top: 14px; border-top: 1px solid var(--ds-border); } }
@media (min-width: 520px) { .rp-scores { flex-direction: column; align-items: flex-start; margin-left: auto; padding-left: 28px; border-left: 1px solid var(--ds-border); } }
.rp-scores img { height: 40px; width: auto; }
@media (max-width: 519px) { .rp-nutri { flex-direction: column; gap: 14px; } .rp-nutri__list { width: 100%; } }
@media (min-width: 760px) { .rp-nutri { gap: 40px; } .rp-donut { width: 150px; height: 150px; } .rp-donut::before { inset: 15px; } .rp-nutri__list { max-width: 460px; } }

/* ---------------- Bon à savoir : astuce, fiches pratiques, profil ---------------- */
.rp-tip { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; margin: 0 0 14px; padding: 18px; border-radius: var(--ds-radius-md); background: var(--ds-accent-soft); }
.rp-tip__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ds-surface); color: var(--ds-accent-text); font-size: 1.05rem; }
.rp-tip__label { margin: 2px 0 4px; font: 600 0.98rem/1.3 var(--ds-font-body); color: var(--ds-text); }
.rp-tip__text { margin: 0; color: var(--ds-text-2); line-height: 1.65; }
@media (max-width: 599px) {
  /* téléphone : l'icône à côté du titre, le texte sur toute la largeur */
  .rp-tip { grid-template-columns: 36px minmax(0, 1fr); column-gap: 10px; row-gap: 8px; padding: 16px; align-items: center; }
  .rp-tip__icon { width: 36px; height: 36px; font-size: 0.9rem; }
  .rp-tip > div { display: contents; }
  .rp-tip__label { margin: 0; }
  .rp-tip__text { grid-column: 1 / -1; }
}
.rp-know { display: grid; gap: 12px; }
@media (min-width: 700px) {
  .rp-know { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rp-know__item:last-child:nth-child(odd) { grid-column: 1 / -1; } /* nombre impair : la dernière fiche prend toute la largeur */
}
.rp-know__item { padding: 16px 18px; border-radius: var(--ds-radius-md); border: 1px solid var(--ds-border); background: var(--ds-surface); }
.rp-know__head { display: flex; align-items: center; gap: 12px; }
.rp-know__icon { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--ds-primary-soft); color: var(--ds-primary-text); font-size: 0.95rem; }
.rp-know__title { flex: 1; min-width: 0; margin: 0; font: 600 0.98rem/1.3 var(--ds-font-body); color: var(--ds-text); }
.rp-know__verdict { flex: none; padding: 4px 10px; border-radius: var(--ds-radius-pill); background: var(--ds-surface-2); color: var(--ds-text-2); font: 600 0.75rem/1.3 var(--ds-font-body); }
.rp-know__verdict.is-yes { background: var(--ds-success-soft); color: var(--ds-success); }
.rp-know__text { margin: 10px 0 0; color: var(--ds-text-2); font-size: 0.93rem; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.rp-know__text.is-open { display: block; }
.rp-know__item .rp-link { margin-top: 6px; }
.rp-profile { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 28px; margin-top: 12px; padding: 16px 18px; border-radius: var(--ds-radius-md); background: var(--ds-surface-2); }
.rp-profile.is-locked { align-items: center; }
.rp-profile.is-locked .ds-btn { justify-self: start; }
.rp-profile__label { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font: 700 var(--ds-text-xs) var(--ds-font-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ds-text-3); }
.rp-profile__label .cb-icon { color: var(--ds-primary-text); font-size: 1.1em; }
.rp-profile__text { margin: 0; color: var(--ds-text); font-size: 0.93rem; line-height: 1.55; }
.rp-fits { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 18px; margin: 0; padding: 0; list-style: none; }
.rp-fits li { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--ds-text); font: 500 var(--ds-text-sm)/1.35 var(--ds-font-body); }
.rp-fits__ico { flex: none; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--ds-success-soft); color: var(--ds-success); font-size: 0.7rem; }
.rp-blur { display: inline-block; filter: blur(5px); user-select: none; }
/* Variantes et erreurs à éviter (contenu SEO écrit à la création de la recette) */
.rp-more { display: grid; gap: 12px; margin-top: 12px; }
@media (min-width: 700px) { .rp-more { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); } }
.rp-more__card { padding: 16px 18px; border-radius: var(--ds-radius-md); border: 1px solid var(--ds-border); background: var(--ds-surface); }
.rp-more__title { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; font: 600 0.98rem/1.3 var(--ds-font-body); color: var(--ds-text); }
.rp-more__card--warn .rp-know__icon { background: var(--ds-warning-soft); color: var(--ds-warning); }
.rp-more__list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rp-more__list li { position: relative; padding-left: 18px; color: var(--ds-text-2); font-size: 0.93rem; line-height: 1.55; }
.rp-more__list li::before { content: ""; position: absolute; left: 4px; top: 0.6em; width: 6px; height: 6px; border-radius: 50%; background: var(--ds-border-strong); }
/* Questions fréquentes : en accordéon (les réponses restent dans la page pour Google) */
.rp-faq { margin-top: 24px; }
.rp-faq__item { border-bottom: 1px solid var(--ds-border); }
.rp-faq__item:first-of-type { border-top: 1px solid var(--ds-border); }
.rp-faq__item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 2px; cursor: pointer; list-style: none;
  color: var(--ds-text); font: 600 0.96rem/1.45 var(--ds-font-body);
}
.rp-faq__item summary::-webkit-details-marker { display: none; }
.rp-faq__item summary .cb-icon { flex: none; color: var(--ds-text-3); font-size: 0.8rem; transition: transform var(--ds-duration) var(--ds-ease); }
.rp-faq__item[open] summary .cb-icon { transform: rotate(180deg); }
.rp-faq__item summary:hover { color: var(--ds-primary-text); }
.rp-faq__item p { margin: 0 0 16px; padding-right: 28px; color: var(--ds-text-2); font-size: 0.95rem; line-height: 1.65; }

.rp-variations { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 760px) { .rp-variations { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rp-variations a {
  display: flex; align-items: center; gap: 14px; padding: 10px 16px 10px 10px; border-radius: var(--ds-radius-md); border: 1px solid var(--ds-border);
  background: var(--ds-surface); color: var(--ds-text); text-decoration: none; font: 600 0.95rem var(--ds-font-body);
}
.rp-variations a:hover { border-color: var(--ds-primary); }
.rp-variations img { border-radius: 14px; object-fit: cover; }
.rp-variations span { flex: 1; }
.rp-variations .cb-icon { color: var(--ds-primary-text); }

.rp-tagsnav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.rp-chip {
  display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--ds-border); background: var(--ds-surface);
  color: var(--ds-text-2); text-decoration: none; font: 600 var(--ds-text-sm) var(--ds-font-body);
}
.rp-chip:hover { border-color: var(--ds-primary); color: var(--ds-primary-text); }

/* ---------------- Avis ---------------- */
.rp-reviews__top { display: grid; gap: 20px; padding-bottom: 20px; }
@media (min-width: 760px) { .rp-reviews__top:not(.is-empty) { grid-template-columns: auto minmax(0, 1fr) minmax(300px, 380px); align-items: center; gap: 32px; } }
.rp-reviews__score { display: grid; justify-items: start; gap: 4px; }
.rp-reviews__score strong { font: 600 2.6rem/1 var(--ds-font-display); color: var(--ds-text); }
.rp-reviews__bars { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: var(--ds-text-xs); }
.rp-reviews__bars li { display: grid; grid-template-columns: 34px 1fr 24px; align-items: center; gap: 10px; }
.rp-reviews__bars .cb-icon { color: var(--rp-star); }
.rp-bar { height: 8px; border-radius: 4px; background: var(--ds-surface-2); overflow: hidden; }
.rp-bar span { display: block; height: 100%; border-radius: 4px; background: var(--rp-star); }
/* Encart « Vous l'avez cuisinée ? » : les étoiles déplient le commentaire dans la page */
.rp-compose { display: grid; justify-items: center; gap: 4px; padding: 20px; border-radius: var(--ds-radius-md); background: var(--ds-surface-2); text-align: center; }
.rp-reviews__top.is-empty .rp-compose { padding: 28px 20px 24px; }
.rp-compose__icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 6px; border-radius: 14px; background: var(--ds-primary-soft); color: var(--ds-primary-text); }
.rp-compose__title { margin: 0; font: 600 1.05rem/1.3 var(--ds-font-display); color: var(--ds-text); }
.rp-compose__sub { margin: 0 0 6px; max-width: 52ch; color: var(--ds-text-2); font-size: var(--ds-text-sm); line-height: 1.5; }
.rp-compose__stars { display: flex; gap: 2px; }
.rp-rate__star {
  display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer;
  color: var(--ds-border-strong); font-size: 1.7rem; transition: color 0.12s, transform var(--ds-duration) var(--ds-ease);
}
.rp-rate__star.is-on, .rp-rate__star.is-hover { color: var(--rp-star); }
.rp-compose__stars:hover .rp-rate__star:not(.is-hover) { color: var(--ds-border-strong); } /* au survol, seul l'aperçu compte */
.rp-rate__star.rp-pop .cb-icon { display: inline-block; animation: rp-heart 0.45s var(--ds-ease); }
.rp-rate__star:hover { transform: scale(1.12); }
.rp-rate__star:focus-visible { outline: none; box-shadow: var(--ds-focus-ring); }
.rp-compose__word { min-height: 1.4em; margin: 0; font: 600 var(--ds-text-sm) var(--ds-font-body); color: var(--ds-accent-text); }
.rp-compose.is-official .ds-btn { margin-top: 8px; }
/* Fenêtre d'avis : la recette en tête, la note choisie reprise en grand, idées, commentaire */
.rp-rsheet { width: min(100% - 24px, 500px); padding-top: 22px; }
.rp-rsheet__recipe { display: flex; align-items: center; gap: 12px; margin: 0 48px 18px 0; text-align: left; }
.rp-rsheet__recipe img { flex: none; width: 56px; height: 56px; border-radius: 14px; object-fit: cover; }
.rp-rsheet__kicker { margin: 0; font-size: var(--ds-text-xs); color: var(--ds-text-3); font-weight: 500; }
.rp-rsheet__name { margin: 2px 0 0; font: 600 1.05rem/1.3 var(--ds-font-display); color: var(--ds-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rp-rsheet__form { display: grid; gap: 12px; }
.rp-rsheet__stars { display: flex; justify-content: center; gap: 4px; padding: 14px 0 0; border-top: 1px solid var(--ds-border); }
.rp-rsheet__stars .rp-rate__star { width: 54px; height: 54px; font-size: 2.15rem; }
.rp-rsheet__stars:hover .rp-rate__star:not(.is-hover) { color: var(--ds-border-strong); }
.rp-rsheet__word { min-height: 1.5em; margin: -4px 0 4px; font: 600 1rem var(--ds-font-body); color: var(--ds-text); }
.rp-rsheet__word span { margin-left: 4px; padding: 2px 8px; border-radius: var(--ds-radius-pill); background: color-mix(in srgb, var(--rp-star) 18%, transparent); color: var(--ds-text); font-size: 0.8rem; }
.rp-rsheet__word.is-empty { color: var(--ds-text-3); font-weight: 500; font-size: var(--ds-text-sm); }
.rp-rsheet .rp-compose__chips { justify-content: center; }
.rp-rsheet .ds-hint { margin: 0; text-align: left; }
.rp-rsheet__buttons { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 4px; }
.rp-compose__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rp-compose__chip {
  padding: 7px 12px; border: 1px solid var(--ds-border); border-radius: var(--ds-radius-pill); background: var(--ds-surface); cursor: pointer;
  color: var(--ds-text-2); font: 600 var(--ds-text-xs) var(--ds-font-body); transition: border-color var(--ds-duration), background var(--ds-duration);
}
.rp-compose__chip:hover { border-color: var(--ds-primary); }
.rp-compose__chip[aria-pressed="true"] { border-color: var(--ds-primary); background: var(--ds-primary-soft); color: var(--ds-primary-text); }
.rp-compose__text { width: 100%; min-height: 104px; padding: 12px 14px; resize: vertical; background: var(--ds-surface); text-align: left; }
.rp-reviews__list:has(.rp-review) { border-top: 1px solid var(--ds-border); }
.rp-reviews__list { display: grid; gap: 0; }
.rp-review { padding: 18px 0; border-bottom: 1px solid var(--ds-border); }
.rp-review:last-child { border-bottom: 0; }
.rp-review.is-official { margin: 8px 0; padding: 18px; border: 0; border-radius: var(--ds-radius-md); background: var(--ds-accent-soft); }
.rp-review.is-new { animation: rp-rise 0.5s var(--ds-ease) both; }
.rp-review__head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.rp-review__avatar { flex: none; border-radius: 50%; object-fit: cover; background: var(--ds-surface-2); }
.rp-review__who { flex: 1; min-width: 0; }
.rp-review__name { margin: 0; font-weight: 600; color: var(--ds-text); }
.rp-review__badge { color: #1d9bf0; font-size: 0.85em; }
.rp-review__team { display: inline-block; margin-left: 4px; padding: 2px 8px; border-radius: 7px; background: var(--ds-accent); color: var(--ds-on-accent); font-size: 0.7rem; font-weight: 700; }
.rp-review__date { margin: 1px 0 0; font-size: var(--ds-text-xs); color: var(--ds-text-3); }
.rp-review__actions { display: flex; gap: 2px; }
.rp-icon-btn { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 10px; background: none; color: var(--ds-text-3); cursor: pointer; text-decoration: none; }
.rp-icon-btn:hover { background: var(--ds-surface-2); color: var(--ds-text); }
.rp-review__text { margin: 8px 0 0; color: var(--ds-text); line-height: 1.6; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.rp-review__text.is-open { display: block; }

/* ---------------- Recettes à suivre ---------------- */
.rp-next__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 16px; }
.rp-cards { gap: 12px; }
/* Mobile : carrousel horizontal (cartes carrées à 78 %, la suivante dépasse pour inviter à glisser) */
@media (max-width: 759px) {
  .rp-cards { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 calc(-1 * var(--rp-gut)); padding: 0 var(--rp-gut) 8px; scroll-padding: 0 var(--rp-gut); scrollbar-width: none; }
  .rp-cards::-webkit-scrollbar { display: none; }
  .rp-cards > * { scroll-snap-align: start; }
}
@media (min-width: 760px) { .rp-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 1100px) { .rp-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 760px) {
  .rp-cards--rail { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: calc((100% - 54px) / 4); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; }
  .rp-cards--rail > * { scroll-snap-align: start; }
}
@media (min-width: 760px) and (max-width: 1099px) { .rp-cards--rail { grid-auto-columns: calc((100% - 36px) / 3); } }

/* ---------------- Barre d'actions mobile ---------------- */
.rp-dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; display: flex; align-items: center; gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--ds-surface) 92%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--ds-border);
  transform: translateY(110%); transition: transform 0.35s var(--ds-ease);
}
.rp-dock.is-visible { transform: none; }
.rp-dock__btn { flex: none; width: 48px; height: 48px; border: 1px solid var(--ds-border); border-radius: 14px; background: var(--ds-surface); color: var(--ds-text); font-size: 1.3rem; cursor: pointer; display: inline-grid; place-items: center; }
.rp-dock__btn.is-on { color: #e5384f; border-color: #f6c2ca; background: #fff1f3; }
.dark-mode .rp-dock__btn.is-on { background: rgba(229, 56, 79, 0.14); }
.rp-dock__main { flex: 1; min-height: 48px; }
@media (min-width: 960px) { .rp-dock { display: none; } .rp { padding-bottom: 48px; } }

/* ---------------- Minuteurs ---------------- */
.rp-timers { position: fixed; z-index: 950; left: 12px; right: 12px; bottom: calc(80px + env(safe-area-inset-bottom)); display: grid; gap: 8px; pointer-events: none; }
@media (min-width: 960px) { .rp-timers { left: 24px; right: auto; bottom: 24px; width: 300px; } }
.rp-timer-chip {
  pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; border-radius: 18px;
  background: #1c1c1c; color: #fff; box-shadow: var(--ds-shadow-lg); animation: rp-rise 0.35s var(--ds-ease) both;
}
.rp-timer-chip__time { font: 700 1.3rem var(--ds-font-display); font-variant-numeric: tabular-nums; min-width: 4.6ch; }
.rp-timer-chip__label { flex: 1; min-width: 0; font-size: var(--ds-text-xs); color: #c9c9c9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-timer-chip button { flex: none; width: 36px; height: 36px; border: 0; border-radius: 11px; background: rgba(255, 255, 255, 0.12); color: #fff; cursor: pointer; }
.rp-timer-chip.is-done { background: var(--ds-accent); color: var(--ds-on-accent); animation: rp-pulse 1s ease-in-out infinite; }
.rp-timer-chip.is-done .rp-timer-chip__label { color: var(--ds-on-accent); }
.rp-timer-chip.is-done button { background: rgba(0, 0, 0, 0.12); color: var(--ds-on-accent); }

/* ---------------- Feuilles (invitation, partage, avis) ---------------- */
.rp-sheet {
  width: min(100% - 24px, 440px); max-height: 92vh; margin: auto; padding: 28px 24px 22px; border: 0; border-radius: var(--ds-radius-lg);
  background: var(--ds-surface); color: var(--ds-text); box-shadow: var(--ds-shadow-lg); text-align: center; overflow: auto;
}
.rp-sheet::backdrop { background: var(--ds-overlay); backdrop-filter: blur(3px); }
.rp-sheet[open] { animation: rp-pop 0.32s var(--ds-ease) both; }
@media (max-width: 600px) {
  .rp-sheet { width: 100%; max-width: none; margin: auto 0 0; border-radius: var(--ds-radius-lg) var(--ds-radius-lg) 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .rp-sheet[open] { animation: rp-up 0.35s var(--ds-ease) both; }
}
.rp-sheet__close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border: 0; border-radius: 12px; background: var(--ds-surface-2); color: var(--ds-text-2); cursor: pointer; }
.rp-sheet__icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--ds-primary-soft); color: var(--ds-primary-text); font-size: 1.4rem; }
.rp-sheet__title { margin: 12px 0 6px; font: 700 1.3rem/1.3 var(--ds-font-display); }
.rp-sheet__text { margin: 0 auto; max-width: 34ch; color: var(--ds-text-2); line-height: 1.55; }
.rp-benefits--sheet { max-width: 300px; margin: 16px auto 0; }
.rp-sheet__buttons { display: grid; gap: 10px; margin-top: 20px; }
.rp-sheet__foot { margin: 14px 0 0; font-size: var(--ds-text-xs); color: var(--ds-text-3); line-height: 1.8; }
.rp-sheet__foot a { color: var(--ds-primary-text); font-weight: 600; font-size: var(--ds-text-sm); }

.rp-share { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 8px; margin-top: 18px; }
.rp-share__item { display: grid; justify-items: center; gap: 6px; padding: 6px; border: 0; background: none; cursor: pointer; color: var(--ds-text); font: 500 var(--ds-text-xs) var(--ds-font-body); }
.rp-share__item[hidden] { display: none; }
.rp-share__icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 18px; background: var(--ds-surface-2); color: var(--ds-text); font-size: 1.35rem; transition: transform var(--ds-duration) var(--ds-ease); }
.rp-share__item:hover .rp-share__icon { transform: translateY(-3px); }
.rp-share__icon--wa { background: #25d366; color: #fff; } .rp-share__icon--fb { background: #1877f2; color: #fff; }
.rp-share__icon--pin { background: #e60023; color: #fff; } .rp-share__icon--x { background: #111; color: #fff; }
.rp-share__icon--mail { background: var(--ds-primary); color: #fff; }
.rp-confirm__icon { background: var(--ds-danger-soft); color: var(--ds-danger); }
.rp-confirm__buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }

.rp-copy { display: flex; gap: 8px; margin-top: 20px; padding: 6px; border-radius: var(--ds-radius-sm); background: var(--ds-surface-2); }
.rp-copy input { flex: 1; min-width: 0; border: 0; background: none; padding: 0 8px; color: var(--ds-text-2); font: 500 var(--ds-text-sm) var(--ds-font-body); }


/* ---------------- Invitation discrète ---------------- */
.rp-nudge {
  position: fixed; z-index: 960; left: 12px; right: 12px; bottom: calc(80px + env(safe-area-inset-bottom)); padding: 18px 18px 16px;
  border-radius: var(--ds-radius-md); background: var(--ds-surface); border: 1px solid var(--ds-border); box-shadow: var(--ds-shadow-lg);
  animation: rp-rise 0.45s var(--ds-ease) both;
}
.rp-nudge[hidden] { display: none; }
@media (min-width: 960px) { .rp-nudge { left: auto; right: 24px; bottom: 24px; width: 360px; } }
.rp-nudge__close { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border: 0; border-radius: 10px; background: var(--ds-surface-2); color: var(--ds-text-2); cursor: pointer; }
.rp-nudge__title { margin: 0 34px 6px 0; font: 700 1rem/1.35 var(--ds-font-display); }
.rp-nudge__title .cb-icon { color: var(--rp-heart); }
.rp-nudge__text { margin: 0; font-size: var(--ds-text-sm); color: var(--ds-text-2); line-height: 1.5; }
.rp-nudge__buttons { display: flex; gap: 8px; margin-top: 14px; }
.rp-nudge__buttons .ds-btn { flex: 1; }

/* ---------------- Mode cuisine ---------------- */
.rp-cm { position: fixed; inset: 0; z-index: 100050; display: flex; flex-direction: column; background: var(--ds-bg); color: var(--ds-text); }
.rp-cm[hidden] { display: none; }
.rp-cm__head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; padding-top: calc(14px + env(safe-area-inset-top)); border-bottom: 1px solid var(--ds-border); background: var(--ds-surface); }
.rp-cm__name { flex: 1; min-width: 0; margin: 0; font: 600 0.95rem var(--ds-font-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-cm__ings-btn, .rp-cm__close { flex: none; height: 42px; padding: 0 14px; border: 0; border-radius: 13px; background: var(--ds-surface-2); color: var(--ds-text); font: 600 var(--ds-text-sm) var(--ds-font-body); cursor: pointer; }
.rp-cm__close { width: 42px; padding: 0; }
.rp-cm__ings-btn[aria-expanded="true"] { background: var(--ds-primary); color: var(--ds-on-primary); }
.rp-cm__progress { height: 4px; background: var(--ds-surface-2); }
.rp-cm__progress span { display: block; height: 100%; width: 0; background: var(--ds-primary); transition: width 0.4s var(--ds-ease); }
.rp-cm__stage { flex: 1; overflow: auto; display: flex; flex-direction: column; justify-content: center; width: 100%; max-width: 860px; margin: 0 auto; padding: 28px 22px; }
.rp-cm__count { margin: 0 0 14px; font: 700 0.8rem var(--ds-font-body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ds-primary-text); }
.rp-cm__text { font: 500 clamp(1.35rem, 4.2vw, 2.1rem)/1.55 var(--ds-font-body); }
.rp-cm__text.is-anim { animation: rp-fade 0.3s var(--ds-ease) both; }
.rp-cm__ings { position: absolute; inset: 72px 0 84px; overflow: auto; padding: 16px 22px; background: var(--ds-surface); z-index: 2; }
.rp-cm__ings ul { max-width: 640px; margin: 0 auto; padding: 0; list-style: none; }
.rp-cm__ings li { padding: 12px 0; border-bottom: 1px solid var(--ds-border); font-size: 1.1rem; }
.rp-cm__nav { display: flex; gap: 10px; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--ds-border); background: var(--ds-surface); }
.rp-cm__nav .ds-btn { flex: 1; min-height: 54px; font-size: 1rem; }
html.rp-noscroll, html.rp-noscroll body { overflow: hidden; }

/* ---------------- Mouvement ---------------- */
@keyframes rp-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes rp-pop { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes rp-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes rp-fade { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes rp-pulse { 50% { transform: scale(1.03); } }
@keyframes rp-heart { 0% { transform: scale(1); } 35% { transform: scale(1.32); } 60% { transform: scale(0.92); } 100% { transform: scale(1); } }
.rp-pop .cb-icon { animation: rp-heart 0.5s var(--ds-ease); }
@media (prefers-reduced-motion: reduce) {
  .rp *, .rp *::before, .rp *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------------- Impression ----------------
 * Le bouton Imprimer (et Ctrl+P) imprime la page elle-même, réduite à l'essentiel pour cuisiner : photo, titre, temps,
 * ingrédients (aux portions choisies) et ustensiles à côté des étapes, puis le logo CookinBreak en bas. Le reste disparaît.
 */
.rp-print-foot { display: none; }
@media print {
  @page { margin: 13mm 14mm 14mm; }
  html, body { background: #fff !important; }
  body > :not(main) { display: none !important; }
  .rp {
    --ds-text: #141414; --ds-text-2: #333; --ds-text-3: #6b6b6b; --ds-border: #dcdcdc; --ds-surface: #fff; --ds-surface-2: #f3f3f3;
    --ds-primary-text: #0b6e72; --ds-primary-soft: #eef6f6; padding: 0 !important; color: #141414; font-size: 10.5pt;
  }
  .rp-wrap { max-width: none; padding: 0 !important; }
  /* hors de la feuille : tout ce qui n'aide pas à cuisiner */
  .rp-crumbs, .rp-tabs, .rp-actions, .rp-dock, .rp-timers, .rp-ad, .rp-next, .rp-compat, .rp-nudge, .rp-wall, .rp-hero__fav, .rp-hero__diets,
  .rp-eyebrow, .rp-rating, .rp-desc, .rp-byline, .rp-fact:not(.rp-fact--time), .rp-hint, .rp-link, .rp-ings__list-btn, .rp-servings__btn,
  .rp-cost, .rp-count, .rp-done, #nutrition, #conseils, #avis, .rp-tagsnav, .rp section:has(.rp-variations), .rp-cm, dialog { display: none !important; }

  /* en-tête : titre et temps à gauche, photo à droite */
  .rp-hero { display: grid !important; grid-template-columns: minmax(0, 1fr) 36%; gap: 22px; align-items: center; }
  .rp-hero__media { order: 2; position: static !important; margin: 0; aspect-ratio: 4 / 3; border-radius: 10px; box-shadow: none !important; }
  .rp-hero__body { padding: 0 !important; }
  .rp-title { font-size: 22pt; }
  .rp-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; padding: 10px 0 0; border-bottom: 0; }
  .rp-fact { grid-template-columns: 18px minmax(0, 1fr); column-gap: 6px; }
  .rp-fact__ico { width: 18px; height: 18px; background: none; color: #141414; font-size: 11pt; }
  .rp-fact dd { font-size: 10.5pt; }

  /* ingrédients + ustensiles à gauche, étapes à droite */
  .rp-cook { display: grid !important; grid-template-columns: 36% minmax(0, 1fr); gap: 26px; margin-top: 18px; padding-top: 14px; border-top: 1px solid #dcdcdc; }
  .rp-card { padding: 0; border: 0; border-radius: 0; box-shadow: none !important; background: none; }
  .rp-card__head { margin-bottom: 6px; }
  .rp-h2 { font-size: 13pt; }
  .rp-ings { position: static !important; max-height: none !important; overflow: visible !important; }
  .rp-servings { display: block; padding: 0 0 6px; background: none; box-shadow: none !important; }
  .rp-servings__value { justify-content: flex-start; font-size: 9.5pt; color: #6b6b6b; }
  .rp-servings__value::before { content: "Pour"; }
  .rp-servings__value input { width: 2ch; font-size: 9.5pt; text-align: center; color: #6b6b6b; }
  .rp-ing__img { display: none; }
  .rp-ing__row { gap: 8px; margin: 0; padding: 4px 0; }
  .rp-ing__check { width: 11px; height: 11px; border-width: 1.5px; background: none !important; border-color: #999 !important; animation: none; }
  .rp-ing__check::after { display: none; }
  .rp-ing__text { font-size: 10pt; }
  .rp-ing.is-done .rp-ing__text { color: inherit; text-decoration: none; }
  .rp-ings .rp-h3 { margin: 14px 0 4px; font-size: 11pt; }
  .rp-tools { display: block; font-size: 10pt; line-height: 1.5; }
  .rp-tool { display: inline; padding: 0; background: none; text-align: left; }
  .rp-tool + .rp-tool::before { content: " · "; color: #999; }
  .rp-tool__img { display: none; }
  .rp-tool__name { display: inline; font-size: 10pt; font-weight: 500; }
  .rp-tool__name small { display: inline; margin-left: 3px; font-size: 9pt; }
  .rp-tool__name small::before { content: "("; } .rp-tool__name small::after { content: ")"; }
  .rp-locked.is-locked .rp-steps__list { filter: none; opacity: 1; max-height: none; -webkit-mask-image: none; mask-image: none; }
  .rp-step { grid-template-columns: 24px minmax(0, 1fr); gap: 10px; padding: 7px 0; break-inside: avoid; }
  .rp-step__num { width: 22px; height: 22px; font-size: 9pt; background: #eee !important; color: #141414 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rp-step.is-done .rp-step__num .cb-icon { display: none; } .rp-step.is-done .rp-step__n { display: inline; }
  .rp-step__text, .rp-step.is-done .rp-step__text { padding-top: 1px; font-size: 10.5pt; line-height: 1.5; color: #141414; }
  .rp-timer { padding: 0; background: none !important; color: inherit !important; font-weight: 600; }
  .rp-timer .cb-icon { display: none; }

  /* pied : logo CookinBreak et adresse de la recette */
  .rp-print-foot { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 24px 0 0; padding-top: 12px; border-top: 1px solid #dcdcdc; break-inside: avoid; }
  .rp-print-foot img { width: 30mm; height: auto; }
  .rp-print-foot span { font-size: 8pt; color: #6b6b6b; }
}
