.scan-beta{max-width:600px;margin:0 auto;padding:16px 16px 80px;color:var(--mp-ui-text,#25332d);display:grid;gap:14px}
.scan-beta h2{font-size:1.5rem;margin:0}
.scan-beta button{min-height:44px;cursor:pointer}
.scan-beta-camera{position:relative;min-height:240px;max-height:50vh;aspect-ratio:4/3;border-radius:20px;background:#26372b;overflow:hidden}
.scan-beta-camera video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.scan-beta-target{position:absolute;inset:16%;border:2px dashed rgba(255,255,255,.75);border-radius:22px;pointer-events:none}
.scan-beta-modes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.scan-beta-modes button{min-width:0;padding:8px 3px;font-size:14px}
.scan-beta-shots{display:flex;gap:8px;overflow:auto}
.scan-beta-shots>div{flex:0 0 30%;min-width:80px;display:grid;gap:5px}
.scan-beta-shots img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:12px}
.scan-beta-policy{font-size:13px;line-height:1.45;color:#566b5e}
.scan-beta-plate-photo{display:grid;gap:12px}
.scan-beta-plate-add{width:100%;min-height:180px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;border-style:dashed;border-radius:20px}
.scan-beta-plate-add svg{width:28px;height:28px}
.scan-beta-plate-add span{font-weight:700}

.scan-beta-plate-preview{display:grid;gap:10px;margin:0}
.scan-beta-plate-preview img{display:block;width:100%;max-height:52vh;aspect-ratio:4/3;object-fit:contain;border-radius:20px;background:var(--mp-ui-surface,#fff)}
.scan-beta-plate-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.scan-beta-plate-actions .mp-ui-action{width:100%}
.scan-beta-consent{display:flex;gap:9px;align-items:flex-start;line-height:1.4}
.scan-beta-consent input{width:22px;height:22px;flex:none}
.scan-beta-items{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.scan-beta-items li{display:flex;gap:7px;flex-wrap:wrap;align-items:center;padding:8px;border:1px solid #d9e3dc;border-radius:12px}
.scan-beta-items li label{flex:1;min-width:120px}
.scan-beta-items input,.scan-beta>label input:not([type=checkbox]){box-sizing:border-box;width:100%;min-height:44px;border:1px solid #abbdb0;border-radius:8px;padding:8px;background:#fff}
.scan-beta-error{color:#9b2a1c}
.scan-beta-wait{display:flex;gap:12px;align-items:center;padding:24px 8px}
.scan-beta-wait span{display:block;flex:none;width:18px;height:18px;border:3px solid #b3c5b6;border-top-color:#315b3b;border-radius:50%;animation:scan-beta-spin 1.2s linear infinite}
@keyframes scan-beta-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.scan-beta-wait span{animation:none;border-style:dotted}}
/* L5C — liste frigo raccordée (styles strictement scopés à l'adaptateur). */
.scan-beta-inventory{display:grid;gap:8px;border:1px solid #d9e3dc;border-radius:12px;padding:10px;background:#fff}
.scan-beta-inventory h3{margin:0;font-size:1rem}
.scan-v3{display:grid;gap:12px}
.scan-v3 h2{font-size:1.1rem;margin:0}
.scan-v3-status{font-size:13px;line-height:1.45;color:#566b5e;margin:0}
.scan-v3-tier{display:grid;gap:8px}
.scan-v3-tier-head{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.scan-v3-tier-head span{font-size:13px;color:#566b5e}
.scan-v3-list{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.scan-v3-list .mp-ui-recipe{margin:0}
/* Capsules fines sur une ligne, compteurs à côté ; défilement si texte agrandi. */
.mp-page[data-screen="frigo-recettes"] .scan-v3,.mp-page[data-screen="frigo-recettes"] .scan-v3-tier{min-width:0}
.mp-page[data-screen="frigo-recettes"] .scan-v3-filters{display:grid;grid-template-columns:repeat(3,minmax(5.75rem,1fr));align-items:stretch;gap:6px;min-width:0;overflow-x:auto;margin:6px 0 8px;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
.mp-page[data-screen="frigo-recettes"] .scan-v3-filters .scan-v3-filter{box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:0;width:100%;min-width:0;max-width:100%;min-height:44px;margin:0;padding:6px 5px;border:1px solid var(--page-line,#e6e9e2);border-radius:999px;background:#fff;color:var(--mp-ui-ink,#25332d);box-shadow:none;font:600 .75rem/1.35 var(--mp-ui-font-sans,system-ui,sans-serif);text-align:center;white-space:nowrap;word-break:normal;overflow-wrap:normal}
.mp-page[data-screen="frigo-recettes"] .scan-v3-filters .scan-v3-filter small{display:inline;margin:0 0 0 4px;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;font-size:.9em;font-weight:500;line-height:inherit;color:inherit;opacity:.8}
.mp-page[data-screen="frigo-recettes"] .scan-v3-filters .scan-v3-filter[aria-pressed="true"]{background:var(--mp-ui-action-accent,#326754);border-color:var(--mp-ui-action-accent,#326754);color:#fff}
.mp-page[data-screen="frigo-recettes"] .scan-v3-filters .scan-v3-filter[aria-pressed="true"] small{opacity:1}
.mp-page[data-screen="frigo-recettes"] .scan-v3-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 12px;min-width:0;align-items:stretch}
.mp-page[data-screen="frigo-recettes"] .scan-v3-grid .mp-page-recipe--catalog{min-width:0;border:0;border-radius:20px;background:#fff;box-shadow:-2px 4px 10px rgb(66 53 31 / 4.5%),-6px 12px 22px rgb(66 53 31 / 4%)}
.mp-page[data-screen="frigo-recettes"] .scan-v3-grid .mp-page-recipe-open{box-sizing:border-box;min-width:0;padding:0 0 12px;border:0;border-radius:0;background:transparent;box-shadow:none}
.mp-page[data-screen="frigo-recettes"] .scan-v3-grid .mp-page-cover{min-width:0;aspect-ratio:4/3;border-radius:20px}
.mp-page[data-screen="frigo-recettes"] .scan-v3-grid .mp-page-cover>img{display:block;width:100%;height:100%;object-fit:cover}
/* Deux lignes en em, sans ancien clip inférieur ni padding qui révèle une
   troisième ligne. La zone grandit avec le texte, pas avec le titre. */
.mp-page[data-screen="frigo-recettes"] .scan-v3-grid .mp-page-recipe-open>strong{box-sizing:border-box;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;width:auto;min-width:0;height:2.16em;min-height:2.16em;max-height:2.16em;margin:0 9px 4px;padding:0;font:700 1.25rem/1.08 var(--serif,Georgia,serif);letter-spacing:-.035em;white-space:normal;overflow-wrap:anywhere;overflow:hidden;text-overflow:ellipsis;clip-path:none;flex-shrink:0}
.mp-page[data-screen="frigo-recettes"] .scan-v3-grid .mp-page-recipe-open>small{box-sizing:border-box;display:flex;flex-wrap:wrap;align-items:center;align-content:flex-start;gap:3px 5px;min-width:0;height:auto;min-height:1.3em;max-height:none;margin:0;padding:0 9px;font-size:.6875rem;line-height:1.3;color:#657067;white-space:normal;overflow-wrap:anywhere;overflow:visible}
.mp-page[data-screen="frigo-recettes"] .scan-v3-grid .mp-page-favorite,.mp-page[data-screen="frigo-recettes"] .scan-v3-grid .mp-page-more{top:8px;bottom:auto;display:grid;place-items:center;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;border:0;border-radius:50%;background:rgb(255 254 250 / 92%);box-shadow:0 2px 8px rgb(40 49 40 / 8%)}
.mp-page[data-screen="frigo-recettes"] .scan-v3-grid .mp-page-favorite{left:8px;right:auto}
.mp-page[data-screen="frigo-recettes"] .scan-v3-grid .mp-page-more{right:8px;left:auto}
.scan-v3-availability{display:block;min-width:0;padding:5px 9px 0;font-size:.75rem;line-height:1.35;color:var(--mp-ui-action-accent,#326754);white-space:normal;overflow-wrap:anywhere}
.scan-v3-subtitle{margin:0}
.scan-v3 .scan-v3-fats-choices .mp-ui-action{min-width:44px;min-height:44px}
/* Dimensions existantes des autres catalogues conservées, hors écran scan. */
.mp-page:is([data-screen="mes-recettes"],[data-screen="favoris"],[data-screen="decouvrir"]) .mp-page-recipe--catalog .mp-page-recipe-open>strong{height:calc(2.11em + 12px);min-height:calc(2.11em + 12px);max-height:calc(2.11em + 12px);overflow-wrap:anywhere}
.mp-page:is([data-screen="mes-recettes"],[data-screen="favoris"],[data-screen="decouvrir"]) .mp-page-recipe--catalog .mp-page-recipe-open>small{height:auto;min-height:28px;max-height:none}
@container(max-width:350px){
.mp-page:is([data-screen="mes-recettes"],[data-screen="favoris"],[data-screen="decouvrir"]) .mp-page-recipe--catalog .mp-page-recipe-open>strong{height:calc(2.11em + 11px);min-height:calc(2.11em + 11px);max-height:calc(2.11em + 11px)}
.mp-page[data-screen="frigo-recettes"] .scan-v3-grid{gap:14px 9px}
.mp-page[data-screen="frigo-recettes"] .scan-v3-grid .mp-page-recipe--catalog,.mp-page[data-screen="frigo-recettes"] .scan-v3-grid .mp-page-cover{border-radius:18px}
.mp-page[data-screen="frigo-recettes"] .scan-v3-grid .mp-page-recipe-open>strong{font-size:1.125rem;margin-inline:8px}
.mp-page[data-screen="frigo-recettes"] .scan-v3-grid .mp-page-recipe-open>small{padding-inline:8px}
.mp-page[data-screen="frigo-recettes"] .scan-v3-grid .mp-page-favorite{left:6px;top:6px}
.mp-page[data-screen="frigo-recettes"] .scan-v3-grid .mp-page-more{right:6px;top:6px}
}
.scan-v3-adaptation{margin:6px 0 0;padding:8px 10px;border-radius:10px;background:#edf2e9;color:#315b3b;font-size:13px;line-height:1.4}
.scan-v3-confirm{display:grid;gap:8px;border:1px solid #d9e3dc;border-radius:12px;padding:10px;background:#fff}
.scan-v3-confirm input{box-sizing:border-box;width:100%;min-height:44px;border:1px solid #abbdb0;border-radius:8px;padding:8px;background:#fff}
.scan-v3-refus{display:grid;gap:8px}
.scan-v3-actions{display:grid;gap:8px}
/* L5C — la fiche frigo réutilise les classes canoniques de masters/pages.css.
   Ces règles y sont scopées à [data-screen="fiche-recette"] ; cette réplique
   stricte (mêmes classes, mêmes valeurs) les réapplique à l'écran frigo sans
   modifier les masters. */
[data-screen="frigo-fiche"] .mp-recipe-detail .mp-page-detail-panel{position:relative;margin-top:0;padding:8px 16px 28px;border-radius:0;background:var(--cream)}
[data-screen="frigo-fiche"] .mp-recipe-facts-card{margin:13px 0 15px;overflow:hidden;border-radius:14px;background:#fff;box-shadow:0 3px 12px rgb(44 57 49 / 4%)}
[data-screen="frigo-fiche"] .mp-recipe-facts{display:flex;align-items:stretch;gap:0;margin:0;padding:10px 4px;overflow:hidden}
[data-screen="frigo-fiche"] .mp-recipe-nutrition-toggle{display:flex;align-items:center;justify-content:center;gap:3px;flex:0 0 auto;min-height:36px;padding:6px 7px;border:0;border-radius:10px;background:#edf2e9;color:#315b3b;font-size:11px;font-weight:700;white-space:nowrap;cursor:pointer}
[data-screen="frigo-fiche"] .mp-recipe-nutrition-toggle svg{width:14px;height:14px}
[data-screen="frigo-fiche"] .mp-recipe-nutrition-toggle svg:last-child{width:12px;height:12px;transition:transform .15s ease}
[data-screen="frigo-fiche"] .mp-recipe-nutrition-toggle[aria-expanded="true"] svg:last-child{transform:rotate(180deg)}
[data-screen="frigo-fiche"] .mp-recipe-fact{display:flex;align-items:center;justify-content:center;gap:3px;flex:1 1 0;min-width:0;min-height:36px;padding:2px 5px;border-left:1px solid #e6ece8;color:#4f5b53;font-size:11px;line-height:1.15;text-align:center}
[data-screen="frigo-fiche"] .mp-recipe-fact--metric{display:grid;align-content:center;justify-items:center;line-height:1.05}
[data-screen="frigo-fiche"] .mp-recipe-fact--metric strong{font-size:11px;font-weight:700;color:#334039;white-space:nowrap}
[data-screen="frigo-fiche"] .mp-recipe-fact--metric small{font-size:9.5px;color:#6c756e;white-space:nowrap}
[data-screen="frigo-fiche"] .mp-recipe-grade-rail{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:8px;margin:0;padding:8px 9px 9px;border-top:1px solid #e6ece8;background:transparent}
[data-screen="frigo-fiche"] .mp-recipe-grade-label{min-width:0;color:#526058;font-size:10.5px;line-height:1.2}
[data-screen="frigo-fiche"] .mp-recipe-grade-scale{display:flex;align-items:center;gap:3px}
[data-screen="frigo-fiche"] .mp-recipe-grade-scale>span{display:grid;place-items:center;width:22px;height:22px;border-radius:7px;font-size:10.5px;font-weight:700;line-height:1;box-shadow:inset 0 0 0 1px rgb(0 0 0 / 5%)}
[data-screen="frigo-fiche"] .mp-recipe-grade-scale>span:nth-child(1){background:#1f6b50;color:#fff}
[data-screen="frigo-fiche"] .mp-recipe-grade-scale>span:nth-child(2){background:#78b85c;color:#17331d}
[data-screen="frigo-fiche"] .mp-recipe-grade-scale>span:nth-child(3){background:#f2c94c;color:#3f3200}
[data-screen="frigo-fiche"] .mp-recipe-grade-scale>span:nth-child(4){background:#e98b32;color:#3d2100}
[data-screen="frigo-fiche"] .mp-recipe-grade-scale>span:nth-child(5){background:#c94a3a;color:#fff}
[data-screen="frigo-fiche"] .mp-recipe-grade-scale>span.is-active{position:relative;z-index:1;transform:scale(1.16);font-weight:900;outline:2px solid #1f2c26;outline-offset:1px;box-shadow:0 2px 6px rgb(31 44 38 / 28%)}
[data-screen="frigo-fiche"] .mp-recipe-section-card{margin:14px 0 0;padding:16px 14px;background:#fff;border:1px solid #e6e9e2;border-radius:20px;box-shadow:0 5px 18px rgb(49 57 48 / 4%)}
[data-screen="frigo-fiche"] .mp-recipe-nutrition-card{margin-top:0}
[data-screen="frigo-fiche"] .mp-page-nutrition-caption{margin:0 0 8px;color:#657067;font-size:12px}
[data-screen="frigo-fiche"] .mp-recipe-nutrition-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
[data-screen="frigo-fiche"] .mp-recipe-nutrition-cell{min-width:0;padding:8px 5px;border-radius:10px;background:#f1f8f4;text-align:center}
[data-screen="frigo-fiche"] .mp-recipe-nutrition-cell>span{display:block;min-height:22px;color:#657067;font-size:9.5px;line-height:1.1}
[data-screen="frigo-fiche"] .mp-recipe-nutrition-cell>strong{display:block;margin-top:3px;color:#263a31;font-size:11px;line-height:1.12;overflow-wrap:anywhere}
[data-screen="frigo-fiche"] .mp-recipe-nutrition-cell>strong small{font-size:9px;font-weight:500;color:#657067}
[data-screen="frigo-fiche"] .mp-page-equipment{margin:0;color:#465148;font-size:14px;line-height:1.55}
[data-screen="frigo-fiche"] .mp-recipe-steps-card .mp-page-step{padding:13px 0;margin:0;border-bottom:1px solid #eef0eb}
[data-screen="frigo-fiche"] .mp-recipe-steps-card .mp-page-step:last-child{border-bottom:0;padding-bottom:0}
[data-screen="frigo-fiche"] .mp-page-source{margin:14px 2px 0;color:#657067;font-size:11px}
[data-screen="frigo-fiche"] .mp-page-detail-actions>div{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.35fr);gap:8px}
/* Fiche canonique uniquement : le mot Indisponible et les valeurs restent
   intacts. Les cellules et libellés se replient, sans ellipse ni masquage.
   Le bouton/accordéon Nutrition et la réglette ne sont pas modifiés. */
.mp-page:is([data-screen="fiche-recette"],[data-screen="fiche-importee"],[data-screen="frigo-fiche"]) .mp-recipe-detail .mp-recipe-facts{flex-wrap:wrap;row-gap:6px}
.mp-page:is([data-screen="fiche-recette"],[data-screen="fiche-importee"],[data-screen="frigo-fiche"]) .mp-recipe-detail .mp-recipe-fact{flex-basis:2.75rem;min-width:0}
.mp-page:is([data-screen="fiche-recette"],[data-screen="fiche-importee"],[data-screen="frigo-fiche"]) .mp-recipe-detail .mp-recipe-fact--metric{grid-template-columns:minmax(0,1fr);justify-content:stretch;min-width:0;height:auto;row-gap:2px;line-height:1.25}
.mp-page:is([data-screen="fiche-recette"],[data-screen="fiche-importee"],[data-screen="frigo-fiche"]) .mp-recipe-detail .mp-recipe-fact--metric strong,.mp-page:is([data-screen="fiche-recette"],[data-screen="fiche-importee"],[data-screen="frigo-fiche"]) .mp-recipe-detail .mp-recipe-fact--metric small{box-sizing:border-box;display:block;width:100%;min-width:0;max-width:100%;height:auto;max-height:none;white-space:normal;word-break:normal;overflow-wrap:anywhere;overflow:visible;text-overflow:clip;-webkit-line-clamp:unset;clip-path:none;line-height:1.25}
.mp-page:is([data-screen="fiche-recette"],[data-screen="fiche-importee"],[data-screen="frigo-fiche"]) .mp-recipe-detail .mp-recipe-fact--metric strong{font-size:.6875rem}
.mp-page:is([data-screen="fiche-recette"],[data-screen="fiche-importee"],[data-screen="frigo-fiche"]) .mp-recipe-detail .mp-recipe-fact--metric small{font-size:.625rem}
/* L3C — parcours v3 « photos → noms seuls → liste » : contrôles sobres et
   strictement scopés (capture manuelle, zones, vues reçues, attente réelle). */
.scan-v3-camera-off{display:grid;place-items:center;min-height:96px}
.scan-v3-camera-offline{margin:0;padding:0 14px;color:#e8efe9;font-size:13px;line-height:1.45;text-align:center}
.scan-v3-zones{display:grid;gap:8px;border:1px solid #d9e3dc;border-radius:12px;padding:10px;background:#fff}
.scan-v3-zones h3{margin:0;font-size:1rem}
.scan-v3-zones p{margin:0;font-size:13px;line-height:1.45;color:#566b5e}
.scan-v3-zone-row{display:flex;gap:6px;flex-wrap:wrap}
.scan-v3-chip{min-height:36px;padding:6px 10px;border:1px solid #abbdb0;border-radius:999px;background:#fff;color:#334039;font-size:13px}
.scan-v3-chip.is-on{background:#315b3b;border-color:#315b3b;color:#fff}
.scan-v3-zones label{display:grid;gap:4px;font-size:13px;color:#465148}
.scan-v3-zones input{box-sizing:border-box;width:100%;min-height:44px;border:1px solid #abbdb0;border-radius:8px;padding:8px;background:#fff}
.scan-v3-views{display:grid;gap:8px;border:1px solid #d9e3dc;border-radius:12px;padding:10px;background:#fff}
.scan-v3-views h3{margin:0;font-size:1rem}
.scan-v3-view-list{display:grid;gap:8px}
.scan-v3-view{display:flex;gap:10px;align-items:center;padding:8px;border:1px solid #e6ece8;border-radius:12px}
.scan-v3-view img{width:56px;height:56px;object-fit:cover;border-radius:10px;flex:none}
.scan-v3-view-icon{display:grid;place-items:center;width:56px;height:56px;border-radius:10px;background:#edf2e9;color:#566b5e;font-size:11px;flex:none}
.scan-v3-view>div{display:grid;gap:2px;flex:1;min-width:0}
.scan-v3-view-state{font-size:13px;color:#315b3b}
.scan-v3-view-name{font-size:12px;color:#566b5e;overflow-wrap:anywhere}
.scan-v3-view-zone{font-size:12px;color:#6c756e}
.scan-v3-note{margin:0;font-size:12px;line-height:1.45;color:#6c756e}
@media (max-width:360px){.scan-v3-chip{font-size:12px}}

/* Scan : disponibilité lisible, distincte du titre et des métadonnées. */
.mp-page[data-screen="frigo-recettes"] .scan-v3-availability { margin: 9px 9px 0; padding: 9px 10px; border-radius: 12px; background: #edf4ed; color: #2d6348; font-size: 13px; line-height: 1.45; }
.mp-page[data-screen="frigo-recettes"] .scan-v3-availability.has-missing { background: #faf1e5; color: #775b31; }
.scan-v3-availability > strong, .scan-v3-missing-detail > strong { display: block; margin-bottom: 5px; font: 600 12px/1.4 var(--sans, system-ui); letter-spacing: 0; }
.scan-v3-missing-names { display: flex; flex-wrap: wrap; gap: 3px 0; }
.scan-v3-missing-names > span { display: inline; overflow-wrap: anywhere; }
.scan-v3-missing-names > span:not(:last-child)::after { content: " · "; white-space: pre; opacity: .6; }
.scan-v3-missing-detail { margin: 12px 0; padding: 13px 15px; border-radius: 14px; background: #faf1e5; color: #775b31; font-size: 15px; line-height: 1.5; }
.scan-v3-missing-detail > strong { font-size: 14px; }
.scan-v3-settings { margin-top: 12px; border-top: 1px solid #e5e9df; }
.scan-v3-settings > summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; font-size: 14px; font-weight: 600; color: #466350; list-style: none; }
.scan-v3-settings > summary::-webkit-details-marker { display: none; }
.scan-v3-settings > summary::after { content: "+"; margin-left: auto; font-size: 20px; font-weight: 400; }
.scan-v3-settings[open] > summary::after { content: "−"; }
.scan-v3-settings > summary:focus-visible { outline: 2px solid #326754; outline-offset: 2px; }
.scan-v3-confirm label { font-size: 14px; }
.scan-v3-confirm input { min-height: 46px; font-size: 16px; }
.mp-page[data-screen="frigo-recettes"] .scan-v3-grid .mp-page-recipe-open > small { font-size: 12px; }
@media (max-width: 350px) {
  .mp-page[data-screen="frigo-recettes"] .scan-v3-availability { margin-inline: 7px; padding: 8px; font-size: 12px; }
}
