/* ============================================================
   Recettes — thème « girlie gourmand »
   Rose poudré, pêche, crème, menthe ; vichy, festons et fiches de cuisine.
   Polices locales (pas de CDN) : Dancing Script (titres), Nunito (texte), licence OFL.
   ============================================================ */

@font-face {
  font-family: 'Dancing Script';
  src: url('dancing-script-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('nunito-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('nunito-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --creme: #fff8f3;
  --papier: #fffdfb;
  --rose-pale: #fde8ee;
  --rose: #f7c5d2;
  --rose-vif: #e86a92;
  --framboise: #c2416c;
  --peche: #ffd9c2;
  --menthe: #cdebdc;
  --menthe-fonce: #3f8f6b;
  --chocolat: #4a2c2a;
  --cacao: #7b5a55;
  --ligne: #f0d5da;
  --ombre: 0 2px 0 rgba(194, 65, 108, .08), 0 8px 24px rgba(74, 44, 42, .08);
  --rayon: 18px;
  --titre: 'Dancing Script', 'Brush Script MT', cursive;
  --texte: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--creme);
  /* petits pois roses discrets, façon nappe */
  background-image: radial-gradient(var(--rose-pale) 2px, transparent 2.5px);
  background-size: 28px 28px;
  color: var(--chocolat);
  font-family: var(--texte);
  font-size: 17px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--framboise); }
a:hover { color: var(--rose-vif); }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
small { color: var(--cacao); }
kbd { background: var(--rose-pale); border-radius: 4px; padding: 0 .35em; font-family: inherit; font-size: .9em; }

:focus-visible { outline: 3px solid var(--rose-vif); outline-offset: 2px; }

.visuellement-cache {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.lien-evitement { position: absolute; left: -999px; top: 0; background: var(--papier); padding: .5em 1em; z-index: 100; }
.lien-evitement:focus { left: 1em; }
.seulement-impression { display: none; }

.titre-manuscrit {
  font-family: var(--titre);
  font-weight: 700;
  color: var(--framboise);
  font-size: clamp(1.9rem, 5vw, 2.6rem);
}
.titre-manuscrit--grand { font-size: clamp(2.3rem, 7vw, 3.6rem); }
.titre-section {
  font-family: var(--titre);
  color: var(--framboise);
  font-size: 2rem;
  margin-top: 1.5em;
}
.titre-section::after { content: ' ♡'; color: var(--rose); }

/* ------------------------------------------------------------
   EN-TÊTE : bande vichy, barre, festons
   ------------------------------------------------------------ */
.entete { background: var(--papier); position: relative; }
.vichy {
  height: 14px;
  background-color: #fff;
  background-image:
    linear-gradient(90deg, rgba(232, 106, 146, .45) 50%, transparent 50%),
    linear-gradient(rgba(232, 106, 146, .45) 50%, transparent 50%);
  background-size: 14px 14px;
}
.entete__barre {
  max-width: 1150px;
  margin: 0 auto;
  padding: .6rem 16px;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.logo { display: flex; align-items: center; gap: .5rem; text-decoration: none; margin-right: auto; }
.logo__icone { font-size: 2rem; }
.logo__texte { font-family: var(--titre); font-size: 2rem; color: var(--framboise); white-space: nowrap; }
.menu { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.menu a, .menu .lien {
  text-decoration: none;
  color: var(--chocolat);
  font-weight: 700;
  padding: .4rem .8rem;
  border-radius: 999px;
  font-size: .95rem;
}
.menu a:hover, .menu .lien:hover { background: var(--rose-pale); color: var(--framboise); }
.menu a[aria-current="page"] { background: var(--rose); color: var(--chocolat); }
.menu__deconnexion { margin: 0; }
.lien { background: none; border: 0; cursor: pointer; font: inherit; }
.compteur-courses {
  background: var(--framboise); color: #fff; border-radius: 999px;
  font-size: .75rem; padding: 0 .45rem; margin-left: .15rem; vertical-align: 1px;
}
.menu-bouton {
  display: none;
  background: var(--rose-pale); border: 0; border-radius: 12px;
  font-size: 1.4rem; padding: .2rem .7rem; color: var(--framboise); cursor: pointer;
}

/* festons : bord dentelé en demi-cercles, comme un napperon */
.festons {
  height: 14px;
  background: radial-gradient(circle at 10px 0, var(--papier) 10px, transparent 10.5px);
  background-size: 20px 14px;
  background-repeat: repeat-x;
  position: absolute; left: 0; right: 0; bottom: -14px;
}
.festons--haut {
  position: static;
  background: radial-gradient(circle at 10px 14px, var(--rose-pale) 10px, transparent 10.5px);
  background-size: 20px 14px;
  background-repeat: repeat-x;
}

@media (max-width: 860px) {
  .menu-bouton { display: block; }
  .menu { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: .5rem; }
  .menu--ouvert { display: flex; }
  .menu a, .menu .lien { padding: .6rem 1rem; width: 100%; text-align: left; }
  .logo__texte { font-size: 1.6rem; }
}

/* ------------------------------------------------------------
   MISE EN PAGE
   ------------------------------------------------------------ */
.contenu {
  flex: 1;
  width: 100%;
  max-width: 1150px;
  margin: 0 auto;
  padding: 2.2rem 16px 3rem;
}
.pied {
  background: var(--rose-pale);
  text-align: center;
  color: var(--cacao);
  font-size: .9rem;
}
.pied p { margin: 0; padding: .6rem 16px 1.2rem; }

/* fiche de cuisine : papier ligné avec marge rose */
.fiche-papier {
  background: var(--papier);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  padding: 1.4rem 1.4rem 1.6rem;
  margin-bottom: 1.4rem;
  border: 1px solid var(--ligne);
  position: relative;
}
.fiche-papier--etroite { max-width: 460px; margin: 1rem auto; }

/* ------------------------------------------------------------
   BOUTONS, PASTILLES, ALERTES
   ------------------------------------------------------------ */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  font: inherit; font-weight: 700; font-size: .95rem;
  padding: .55rem 1.1rem;
  border-radius: 999px;
  border: 2px solid var(--rose);
  background: var(--papier);
  color: var(--chocolat);
  text-decoration: none;
  cursor: pointer;
  transition: transform .1s, background .15s;
  min-height: 44px;
}
.bouton:hover { background: var(--rose-pale); color: var(--chocolat); }
.bouton:active { transform: translateY(1px); }
.bouton:disabled { opacity: .6; cursor: wait; }
.bouton--principal {
  background: var(--rose-vif); border-color: var(--rose-vif); color: #fff;
  box-shadow: 0 3px 0 var(--framboise);
}
.bouton--principal:hover { background: var(--framboise); border-color: var(--framboise); color: #fff; }
.bouton--grand { font-size: 1.1rem; padding: .7rem 1.6rem; }
.bouton--petit { min-height: 34px; padding: .25rem .8rem; font-size: .85rem; }
.bouton--danger { border-color: #f1b3b3; color: #a33; }
.bouton--danger:hover { background: #fdeaea; color: #a33; }
.bouton--ajout { border-style: dashed; color: var(--framboise); }
.bouton--discret { border-color: transparent; color: var(--cacao); }

.bouton-rond {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--rose); background: var(--papier);
  font-size: 1.3rem; font-weight: 700; color: var(--framboise); cursor: pointer;
}
.bouton-rond:hover { background: var(--rose-pale); }
.bouton-icone {
  width: 34px; height: 34px; border-radius: 10px; border: 0;
  background: transparent; color: var(--cacao); cursor: pointer; font-size: 1rem;
}
.bouton-icone:hover { background: var(--rose-pale); color: var(--framboise); }
.bouton-icone--danger:hover { background: #fdeaea; color: #a33; }

.puces { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.puce {
  display: inline-flex; align-items: center; gap: .3rem;
  background: var(--papier); border: 2px solid var(--rose);
  border-radius: 999px; padding: .3rem .9rem;
  text-decoration: none; color: var(--chocolat); font-weight: 700; font-size: .92rem;
}
.puce small { background: var(--rose-pale); border-radius: 999px; padding: 0 .4rem; }
.puce:hover, .puce--active { background: var(--rose); color: var(--chocolat); }
.puces--petites .puce { font-size: .82rem; padding: .15rem .7rem; border-width: 1px; }
.puce__retirer { border: 0; background: none; cursor: pointer; color: var(--framboise); font-size: .85rem; padding: 0 .1rem; }

.pastille {
  display: inline-block; font-size: .75rem; font-weight: 700;
  border-radius: 999px; padding: .1rem .6rem; background: var(--peche);
}
.pastille--brouillon { background: var(--peche); }
.pastille--prive { background: #e3dcf5; }

.alerte {
  border-radius: 14px; padding: .8rem 1.1rem; margin-bottom: 1.2rem; font-weight: 700;
  background: var(--menthe); color: #1f5a40; border: 1px solid #a9d8c1;
}
.alerte--erreur { background: #fdeaea; color: #8a2323; border-color: #f1b3b3; }
.alerte--info { background: #fff1d9; color: #7a4d00; border-color: #f5d49c; }

.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 2rem);
  background: var(--chocolat); color: #fff; padding: .7rem 1.2rem; border-radius: 999px;
  opacity: 0; transition: .3s; z-index: 50; max-width: calc(100% - 32px); text-align: center;
}
.toast--visible { opacity: 1; transform: translate(-50%, 0); }

.vide { text-align: center; color: var(--cacao); padding: 2rem 1rem; font-size: 1.05rem; }
.aide { color: var(--cacao); font-size: .9rem; margin-top: -.3rem; }

/* ------------------------------------------------------------
   FORMULAIRES
   ------------------------------------------------------------ */
.formulaire label { display: block; font-weight: 700; margin-bottom: .9rem; }
.formulaire label > input, .formulaire label > select, .formulaire label > textarea { margin-top: .25rem; }
input[type=text], input[type=search], input[type=password], input[type=number], input[type=url], select, textarea {
  width: 100%;
  font: inherit; font-weight: 400; color: var(--chocolat);
  background: #fff;
  border: 2px solid var(--ligne);
  border-radius: 12px;
  padding: .55rem .8rem;
  min-height: 44px;
}
input:focus, select:focus, textarea:focus { border-color: var(--rose-vif); outline: none; box-shadow: 0 0 0 3px var(--rose-pale); }
textarea { resize: vertical; line-height: 1.5; }
.case { display: flex !important; align-items: center; gap: .5rem; font-weight: 400 !important; cursor: pointer; }
.case input { width: 20px; height: 20px; accent-color: var(--rose-vif); }
.case--danger { color: #a33; }
.formulaire--grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 1rem; align-items: end; }
.en-ligne { display: inline-flex; gap: .4rem; align-items: center; margin: .15rem 0; }
.en-ligne input { width: 190px; min-height: 34px; padding: .25rem .6rem; }

fieldset.fiche-papier { min-width: 0; }
legend {
  font-family: var(--titre); font-size: 1.8rem; color: var(--framboise);
  background: var(--papier); padding: 0 .6rem; border-radius: 10px;
}
.grille-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 1.2rem; }
.grille-infos { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 1rem; }
.champ-groupe { display: flex; gap: .4rem; align-items: center; font-weight: 400; margin-top: .25rem; }
.champ-court { max-width: 90px; }
.champ-moyen { max-width: 150px; }
.champ-titre { font-size: 1.15rem !important; font-weight: 700 !important; }

/* choix en pilules (radios) */
.choix-pilules { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: .8rem; }
.choix-pilules__titre { font-weight: 700; width: 100%; }
.choix-pilules label { margin: 0; font-weight: 400; }
.choix-pilules input { position: absolute; opacity: 0; pointer-events: none; }
.choix-pilules label span {
  display: inline-block; border: 2px solid var(--ligne); border-radius: 999px;
  padding: .3rem .9rem; cursor: pointer; background: #fff;
}
.choix-pilules input:checked + span { background: var(--rose); border-color: var(--rose-vif); font-weight: 700; }
.choix-pilules input:focus-visible + span { outline: 3px solid var(--rose-vif); outline-offset: 2px; }

/* lignes dynamiques (ingrédients, étapes, liens) */
.lignes { list-style: none; margin: 0 0 .8rem; padding: 0; }
.ligne {
  display: grid; gap: .4rem; align-items: center;
  padding: .45rem; margin-bottom: .4rem;
  border-radius: 14px; background: #fff; border: 1px dashed var(--ligne);
}
.ligne:focus-within { border-color: var(--rose-vif); border-style: solid; background: var(--rose-pale); }
.ligne input, .ligne select, .ligne textarea { min-height: 40px; padding: .4rem .6rem; }
.ligne--ingredient { grid-template-columns: 18px 80px 130px minmax(120px, 1.4fr) minmax(100px, 1fr) auto; }
.ligne--section { grid-template-columns: 18px 1fr auto; background: var(--rose-pale); }
.ligne__section { font-weight: 700; font-style: italic; }
.ligne--etape { grid-template-columns: 34px 1fr auto; align-items: start; }
.ligne--lien { grid-template-columns: minmax(160px, 2fr) minmax(120px, 1fr) 72px auto; }
.ligne__poignee { color: var(--rose); font-weight: 700; text-align: center; user-select: none; }
.ligne__boutons { display: flex; gap: 0; }
.ligne__apercu img { width: 72px; border-radius: 6px; }
.lignes--numerotees { counter-reset: etape; }
.ligne__numero::before {
  counter-increment: etape; content: counter(etape);
  display: grid; place-items: center; width: 30px; height: 30px; margin-top: 5px;
  border-radius: 50%; background: var(--rose-vif); color: #fff; font-weight: 700;
}
.ajouts { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }

@media (max-width: 720px) {
  .ligne--ingredient { grid-template-columns: 70px 1fr auto; }
  .ligne--ingredient .ligne__poignee { display: none; }
  .ligne--ingredient .ligne__nom { grid-column: 1 / 3; grid-row: 2; }
  .ligne--ingredient .ligne__note { grid-column: 1 / 4; grid-row: 3; }
  .ligne--ingredient .ligne__boutons { grid-column: 3; grid-row: 1 / 3; flex-direction: column; }
  .ligne--lien { grid-template-columns: 1fr auto; }
  .ligne--lien .ligne__titre { grid-column: 1; }
  .ligne--lien .ligne__apercu { grid-column: 2; grid-row: 2; }
}

/* collage d'un texte */
.collage summary { cursor: pointer; font-weight: 700; color: var(--framboise); font-size: 1.05rem; }
.collage[open] summary { margin-bottom: .6rem; }
.collage textarea { margin-bottom: .7rem; font-size: .95rem; }
.collage__retour { margin-left: .8rem; font-weight: 700; color: var(--menthe-fonce); }

/* photos */
.depot-photos {
  display: block; border: 2px dashed var(--rose); border-radius: var(--rayon);
  padding: 1.2rem; text-align: center; cursor: pointer; background: var(--rose-pale);
  font-weight: 700; color: var(--framboise);
}
.depot-photos:hover { background: var(--rose); }
.depot-photos input { display: block; margin: 0 auto .6rem; max-width: 100%; }
.depot-photos small { display: block; font-weight: 400; }
.apercus-photos, .photos-existantes { display: flex; flex-wrap: wrap; gap: .7rem; margin: .8rem 0; }
.apercus-photos.est-en-cours::after { content: '⏳ préparation des photos…'; color: var(--cacao); }
.apercu-photo, .photo-existante { position: relative; margin: 0; width: 130px; }
.apercu-photo img, .photo-existante img { width: 130px; height: 100px; object-fit: cover; border-radius: 12px; }
.apercu-photo .bouton-icone { position: absolute; top: 4px; right: 4px; background: #fff; }
.photo-existante figcaption { font-size: .85rem; }
.apercu-photo__poids { font-size: .8rem; color: var(--menthe-fonce); text-align: center; }
.apercu-photo__poids--trop { color: #a33; font-weight: 700; }
.photo-existante .case { margin: .2rem 0 !important; }

/* barre d'enregistrement collée en bas */
.barre-enregistrer {
  position: sticky; bottom: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .6rem;
  background: rgba(255, 253, 251, .96);
  border: 1px solid var(--ligne); border-radius: var(--rayon) var(--rayon) 0 0;
  padding: .7rem 1rem; box-shadow: 0 -6px 20px rgba(74, 44, 42, .08);
}
.barre-enregistrer .choix-pilules { margin: 0; }
@media (max-width: 560px) {
  .barre-enregistrer { padding: .5rem; }
  .barre-enregistrer .choix-pilules { flex-wrap: nowrap; gap: .25rem; }
  .barre-enregistrer .choix-pilules label span { padding: .2rem .55rem; font-size: .85rem; }
  .barre-enregistrer .bouton--grand { width: 100%; }
}
.zone-danger { text-align: right; margin-top: 2rem; }

/* ------------------------------------------------------------
   ACCUEIL, RECHERCHE, CARTES
   ------------------------------------------------------------ */
.accueil { text-align: center; margin-bottom: 1rem; }
.accueil__sous-titre { color: var(--cacao); margin-top: -.3rem; }
.recherche { display: flex; gap: .5rem; max-width: 560px; margin: 1.2rem auto; }
.recherche input { border-radius: 999px; padding-left: 1.2rem; }
.bandeau-frigo {
  display: flex; align-items: center; gap: 1rem; justify-content: center; text-align: left;
  max-width: 560px; margin: 0 auto 1rem; padding: 1rem 1.3rem;
  background: linear-gradient(135deg, var(--menthe), var(--peche));
  border-radius: var(--rayon); text-decoration: none; color: var(--chocolat); box-shadow: var(--ombre);
  transition: transform .15s;
}
.bandeau-frigo:hover { transform: rotate(-.6deg) scale(1.01); color: var(--chocolat); }
.bandeau-frigo__icone { font-size: 1.8rem; white-space: nowrap; }
.accueil .puces { justify-content: center; }

.filtres { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .5rem; }
.filtres input[type=search] { flex: 2 1 220px; width: auto; }
.filtres select { flex: 1 1 160px; width: auto; }
.resultat-compte { color: var(--cacao); font-size: .9rem; }

.grille-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.3rem; }
.carte {
  display: flex; flex-direction: column;
  background: var(--papier); border-radius: var(--rayon); overflow: hidden;
  box-shadow: var(--ombre); text-decoration: none; color: var(--chocolat);
  border: 1px solid var(--ligne);
  transition: transform .15s, box-shadow .15s;
}
.carte:nth-child(3n+1):hover { transform: rotate(-1deg) translateY(-3px); }
.carte:nth-child(3n+2):hover { transform: rotate(1deg) translateY(-3px); }
.carte:nth-child(3n):hover { transform: translateY(-4px); }
.carte:hover { color: var(--chocolat); box-shadow: 0 12px 28px rgba(194, 65, 108, .18); }
.carte__image { position: relative; aspect-ratio: 4 / 3; background: var(--rose-pale); }
.carte__image img { width: 100%; height: 100%; object-fit: cover; }
.carte__image .pastille { position: absolute; top: .6rem; left: .6rem; }
.carte__sans-photo {
  width: 100%; height: 100%;
  /* assiette, couverts : motif dessiné en CSS quand la recette n'a pas de photo */
  background:
    radial-gradient(circle at 50% 50%, #fff 0 26%, var(--rose) 26.5% 29%, #fff 29.5% 36%, transparent 36.5%),
    repeating-linear-gradient(45deg, var(--rose-pale) 0 12px, var(--peche) 12px 24px);
}
.carte__corps { padding: .8rem 1rem 1rem; }
.carte__categorie {
  font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700;
  color: var(--menthe-fonce); text-decoration: none;
}
.carte__titre { font-size: 1.12rem; margin: .2rem 0 .3rem; }
.carte__meta { font-size: .85rem; color: var(--cacao); margin: 0; }
.frigo__avec { font-size: .85rem; color: var(--menthe-fonce); margin: .4rem 0 0; }
.frigo__manque { font-size: .85rem; color: var(--framboise); margin: .2rem 0 0; }
.frigo__complet { font-size: .9rem; font-weight: 700; color: var(--menthe-fonce); margin: .3rem 0 0; }

.saisie-puces {
  display: flex; flex-wrap: wrap; gap: .4rem; align-items: center;
  border: 2px solid var(--ligne); border-radius: 14px; background: #fff;
  padding: .4rem; margin: .3rem 0 1rem; cursor: text;
}
.saisie-puces:focus-within { border-color: var(--rose-vif); box-shadow: 0 0 0 3px var(--rose-pale); }
.saisie-puces > input[type=text] { border: 0; box-shadow: none; flex: 1 1 160px; min-height: 36px; padding: .2rem .4rem; }
.saisie-puces .puce { font-size: .92rem; padding: .15rem .4rem .15rem .8rem; }

/* ------------------------------------------------------------
   FICHE RECETTE
   ------------------------------------------------------------ */
.recette__entete { text-align: center; margin-bottom: 1.2rem; }
.recette__entete .titre-manuscrit { margin: .3rem 0 .2rem; }
.recette__origine { font-style: italic; color: var(--cacao); margin: 0 0 .8rem; }
.recette__meta {
  list-style: none; padding: 0; margin: 0 0 1rem;
  display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem;
}
.recette__meta li { background: var(--papier); border: 1px solid var(--ligne); border-radius: 999px; padding: .2rem .9rem; font-size: .92rem; }
.recette__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.recette__description { font-size: 1.08rem; text-align: center; max-width: 720px; margin: 0 auto 1.4rem; font-style: italic; }

.galerie { max-width: 820px; margin: 0 auto 1.6rem; }
.galerie__principale {
  width: 100%; max-height: 520px; object-fit: cover;
  border-radius: var(--rayon); box-shadow: var(--ombre);
  border: 8px solid #fff;
}
.galerie__vignettes { display: flex; gap: .5rem; justify-content: center; margin-top: .6rem; flex-wrap: wrap; }
.galerie__vignette { border: 3px solid transparent; border-radius: 12px; padding: 0; background: none; cursor: pointer; }
.galerie__vignette img { width: 72px; height: 56px; object-fit: cover; border-radius: 9px; }
.galerie__vignette.est-active { border-color: var(--rose-vif); }

.recette__corps { display: grid; grid-template-columns: minmax(260px, 1fr) 2fr; gap: 1.6rem; align-items: start; }
@media (max-width: 820px) { .recette__corps { grid-template-columns: 1fr; } }

.ingredients-bloc {
  /* ruban adhésif façon washi tape */
  margin-top: 10px;
}
.ingredients-bloc::before {
  content: ''; position: absolute; top: -12px; left: 50%; width: 110px; height: 26px;
  transform: translateX(-50%) rotate(-3deg);
  background: repeating-linear-gradient(90deg, rgba(232, 106, 146, .35) 0 8px, rgba(255, 217, 194, .55) 8px 16px);
  border-radius: 3px;
}
.reglages { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; justify-content: space-between; margin-bottom: .8rem; }
.portions { display: flex; align-items: center; gap: .4rem; }
.portions__nombre { font-size: 1.4rem; font-weight: 700; min-width: 1.6em; text-align: center; color: var(--framboise); }
.choix-unites { display: inline-flex; border: 2px solid var(--rose); border-radius: 999px; overflow: hidden; }
.choix-unites button { border: 0; background: #fff; font: inherit; font-size: .8rem; font-weight: 700; padding: .35rem .7rem; cursor: pointer; color: var(--cacao); }
.choix-unites button.est-actif { background: var(--rose); color: var(--chocolat); }

.ingredients { list-style: none; margin: 0; padding: 0; }
.ingredients__groupe {
  font-family: var(--titre); font-size: 1.4rem; color: var(--framboise);
  margin: .8rem 0 .2rem; border-bottom: 2px dotted var(--rose);
}
.ingredient { border-bottom: 1px solid var(--rose-pale); }
.ingredient label { display: flex; gap: .5rem; align-items: baseline; padding: .4rem 0; cursor: pointer; flex-wrap: wrap; }
.ingredient__case { accent-color: var(--rose-vif); width: 18px; height: 18px; flex-shrink: 0; transform: translateY(3px); }
.ingredient__qte { font-weight: 700; color: var(--framboise); white-space: nowrap; }
.ingredient__note { color: var(--cacao); font-size: .9rem; font-style: italic; }
.ingredient:has(.ingredient__case:checked) label { opacity: .45; text-decoration: line-through; }

.etapes { counter-reset: etape; list-style: none; padding: 0; margin: 0 0 1.2rem; }
.etape {
  counter-increment: etape;
  position: relative;
  padding: .9rem 1rem .9rem 3.6rem; margin-bottom: .8rem;
  background: var(--papier); border-radius: var(--rayon); box-shadow: var(--ombre); border: 1px solid var(--ligne);
}
.etape::before {
  content: counter(etape);
  position: absolute; left: .9rem; top: .8rem;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--rose-vif); color: #fff; font-weight: 700;
  font-family: var(--titre); font-size: 1.3rem;
}
.etapes--cochables .etape { cursor: pointer; }
.etape.est-fait { opacity: .45; }
.etape.est-fait::before { content: '✓'; background: var(--menthe-fonce); font-family: var(--texte); }

.astuce {
  background: var(--peche); border-radius: var(--rayon); padding: 1rem 1.2rem;
  border: 2px dashed #f3b48f;
}
.astuce h3 { font-family: var(--titre); font-size: 1.6rem; color: var(--framboise); margin-bottom: .2rem; }
.astuce p { margin: 0; }

.videos, .liens { margin-top: 2rem; }
.video { position: relative; aspect-ratio: 16 / 9; max-width: 820px; margin: 0 auto 1rem; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--rayon); box-shadow: var(--ombre); }
.liens ul { padding-left: 1.2rem; }

/* ------------------------------------------------------------
   MODE CUISINE : gros caractères, contrasté
   ------------------------------------------------------------ */
.page-cuisine { font-size: 21px; background-image: none; }
.page-cuisine .contenu { max-width: 1300px; padding-top: 1rem; }
.cuisine__entete { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.cuisine__entete .titre-manuscrit { margin: 0; flex: 1; }
.cuisine__eveil { font-size: .8rem; background: var(--menthe); border-radius: 999px; padding: .2rem .8rem; }
.page-cuisine .ingredient label { padding: .6rem 0; }
.page-cuisine .ingredient__case { width: 24px; height: 24px; }
.page-cuisine .etape { padding: 1.1rem 1.2rem 1.1rem 4rem; line-height: 1.55; }
.cuisine__fin { text-align: center; font-family: var(--titre); font-size: 2rem; color: var(--framboise); }

/* ------------------------------------------------------------
   COURSES, TABLEAUX
   ------------------------------------------------------------ */
.courses { max-width: 680px; margin: 0 auto; }
.courses__recettes { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.courses__recettes .puce a { text-decoration: none; color: inherit; }
.courses__liste { list-style: none; padding: 0; margin: 0 0 1rem; }
.courses__article { border-bottom: 1px dashed var(--ligne); }
.courses__article label { display: flex; align-items: baseline; gap: .3rem; padding: .55rem 0; cursor: pointer; }
.courses__article input { accent-color: var(--rose-vif); width: 20px; height: 20px; transform: translateY(4px); }
.courses__article strong { color: var(--framboise); }
.courses__article.est-fait label { opacity: .45; text-decoration: line-through; }
.courses__ajout { display: flex; gap: .5rem; margin-bottom: 1rem; }
.courses__actions { display: flex; flex-wrap: wrap; gap: .5rem; }

.tableau-defilant { overflow-x: auto; margin-bottom: 1.5rem; }
.tableau { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tableau th { text-align: left; background: var(--rose-pale); padding: .5rem .7rem; }
.tableau td { padding: .5rem .7rem; border-bottom: 1px solid var(--ligne); vertical-align: middle; }
.tableau__actions { white-space: nowrap; }

/* ------------------------------------------------------------
   IMPRESSION : une fiche propre, sans décor
   ------------------------------------------------------------ */
@media print {
  body { background: #fff; font-size: 12pt; color: #000; }
  .entete, .pied, .sans-impression, .lien-evitement, .barre-enregistrer, .toast, .galerie__vignettes { display: none !important; }
  .seulement-impression { display: block; }
  .contenu { padding: 0; max-width: none; }
  .fiche-papier, .etape, .carte { box-shadow: none; border: 1px solid #ccc; }
  .ingredients-bloc::before { display: none; }
  .galerie__principale { max-height: 7cm; width: auto; margin: 0 auto; border: 0; }
  .recette__corps { grid-template-columns: 1fr 2fr; }
  .etape { break-inside: avoid; padding-left: 2.8rem; }
  .ingredient__case, .courses__article input { display: none; }
  .titre-manuscrit, .titre-section { color: #000; }
  a { color: #000; text-decoration: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
