/* Fiche et mode cuisine */
.recipe-sheet, .cook-dialog, .day-dialog {
  --pine:#254b38; --pine-dark:#183b2a; --mint:#e8eee4; --paper:#fffcf7;
  --text:#282a22; --sub:#595d51; --edge:#dfded0; color:var(--text);
}
.recipe-sheet { max-width:1120px; margin:0 auto 60px; }
.sheet-tools, .sheet-tools>div, .sheet-back, .sheet-tool, .sheet-actions, .sheet-button,
.dish-tags, .dish-tags span, .dish-facts, .dish-fact, .portion-row, .portion-row>span,
.portion-control, .method-heading, .step-length, .cook-top, .cook-foot, .timer-presets,
.timer-pill, .free-timer summary, .live-timer>span {display:flex;align-items:center}
.sheet-tools {justify-content:space-between;gap:12px;padding:16px 0}
.sheet-tools>div {gap:8px}
.sheet-back,.sheet-tool {gap:8px;min-height:44px;padding:7px 12px;border:1px solid transparent;border-radius:10px;background:transparent;color:#354c3b;font-size:.94rem;font-weight:650}
.sheet-back {padding-left:0}
.sheet-tool:hover,.sheet-back:hover {color:var(--pine-dark);background:#ecefe5}
.sheet-tool[aria-pressed="true"] {background:var(--mint);color:var(--pine-dark)}
.sheet-tool[aria-pressed="true"] svg {fill:currentColor}
.dish-hero {display:grid;align-items:stretch;overflow:hidden;background:#f2f0e6;border:1px solid #e3e0d2;border-radius:23px}
.dish-hero.with-photo {grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.dish-photo-wrap {position:relative;min-height:335px;overflow:hidden;background:#e1d7bf}
.dish-photo {position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 53%}
.dish-copy {display:flex;flex-direction:column;align-items:flex-start;align-self:center;padding:clamp(24px,3.25vw,48px);min-width:0}
.dish-tags {gap:7px;flex-wrap:wrap;margin-bottom:15px}
.dish-tags span {gap:5px;border-radius:20px;background:#dfe9d9;color:#294933;padding:5px 10px;font-size:.84rem;line-height:1.35;font-weight:700}
.dish-tags span+span {background:#f6e5ce;color:#6b4421}
.dish-tags svg {width:14px;height:14px}
.dish-copy h1 {font:600 clamp(2.65rem,4.15vw,4.3rem)/.99 var(--serif);letter-spacing:-.055em;text-wrap:balance;overflow-wrap:anywhere;margin:0;max-width:23ch}
.dish-copy h1 em {font-weight:400;color:var(--pine)}
.dish-copy h1:focus:not(:focus-visible),#cook-title:focus:not(:focus-visible){outline:none}
.dish-intro {color:#515345;max-width:42ch;line-height:1.52;margin:14px 0 0;font-size:1rem}
.dish-facts {gap:18px 28px;flex-wrap:wrap;margin:19px 0 20px}
.dish-fact {gap:8px}
.dish-fact>svg {width:21px;height:21px;color:var(--pine)}
.dish-fact dt {font-size:.81rem;color:var(--sub);line-height:1.3}
.dish-fact dd {font-size:1rem;line-height:1.35;font-weight:730;margin:0}
.sheet-actions {gap:8px;flex-wrap:wrap}
.sheet-button {display:inline-flex;justify-content:center;gap:8px;min-height:46px;padding:10px 15px;border:1px solid transparent;border-radius:10px;font:700 .93rem/1.2 var(--sans);white-space:normal;text-align:center}
.cook-primary {background:var(--pine);color:white}
.cook-primary:hover {background:var(--pine-dark)}
.light {background:var(--paper);color:var(--pine-dark);border-color:#bac7b7}
.light:hover {background:var(--mint)}
.sheet-button:disabled,.portion-control button:disabled {opacity:.42;cursor:default}
.dish-hero.text-only {background:linear-gradient(115deg,#e8eddf,#f8f3e8 76%);border-left:5px solid #526e50}
.text-only .dish-copy {padding-block:clamp(24px,3.5vw,46px)}
.text-only .dish-copy h1 {max-width:27ch}
.sheet-body {display:grid;grid-template-columns:minmax(246px,.79fr) minmax(0,1.65fr);align-items:start;gap:clamp(24px,4vw,58px);margin-top:30px}
.sheet-body h2 {font:600 clamp(1.9rem,2.7vw,2.6rem)/1.12 var(--serif);letter-spacing:-.045em}
.ingredient-panel {border:1px solid var(--edge);padding:22px;border-radius:17px;background:#f7f7ef}
.ingredient-panel h2 {margin:0 0 10px}
.portion-row {justify-content:space-between;gap:8px;border-bottom:1px solid var(--edge);padding:2px 0 12px}
.portion-row>span {gap:7px;color:#334c3a}
.portion-row strong {font-size:.96rem}
.portion-control {padding:0;border:1px solid #bcc8b9;border-radius:9px;background:var(--paper)}
.portion-control button {display:grid;place-items:center;width:42px;height:42px;border:0;background:transparent;border-radius:8px;color:var(--pine)}
.portion-control button+button {border-left:1px solid #d3daca;border-radius:0 8px 8px 0}
.portion-control button:hover:not(:disabled) {background:var(--mint)}
.ingredient-list,.method-steps,.cook-ingredients ul {list-style:none;margin:0;padding:0}
.ingredient-line {position:relative;display:grid;grid-template-columns:21px 1fr auto;align-items:center;gap:9px;padding:11px 0;min-height:47px;cursor:pointer;line-height:1.35;font-size:.97rem}
.ingredient-list li+li {border-top:1px solid #e3e5d9}
.ingredient-line input {position:absolute;opacity:0;width:22px;height:22px;left:0;top:50%;margin:0;transform:translateY(-50%)}
.tick-box {width:20px;height:20px;border:1.5px solid #8e9b86;background:#fffdf7;border-radius:6px;display:grid;place-items:center;color:transparent}
.tick-box svg {width:15px;height:15px;stroke-width:2.4}
.ingredient-line input:focus-visible+.tick-box {outline:3px solid #317766;outline-offset:3px}
.ingredient-line input:checked+.tick-box {background:var(--pine);border-color:var(--pine);color:#fff}
.ingredient-line input:checked~.ingredient-name {text-decoration:line-through;color:#686d60}
.ingredient-line b {font-variant-numeric:tabular-nums;text-align:right;color:#344d38;font-size:.92rem;font-weight:700}
.ingredients-count {font-size:.84rem;color:var(--sub);border-top:1px solid var(--edge);padding-top:12px}
.method-heading {justify-content:space-between;gap:10px;border-bottom:1px solid var(--edge);padding:3px 0 14px}
.method-heading>span {font-size:.89rem;color:var(--sub)}
.method-steps li {display:grid;grid-template-columns:32px minmax(0,1fr);gap:13px;padding:17px 0;border-bottom:1px solid var(--edge);align-items:start}
.method-steps li:has(.method-photo) {grid-template-columns:32px minmax(0,1fr) clamp(80px,10vw,128px)}
.step-number {width:32px;height:32px;display:grid;place-items:center;flex-shrink:0;border-radius:50%;color:var(--pine);background:var(--mint);font:700 1rem var(--sans);font-variant-numeric:tabular-nums}
.method-text h3 {font:650 1.2rem/1.26 var(--serif);letter-spacing:-.025em;margin:2px 0 5px}
.method-text p,.cook-instruction {font-size:1rem;line-height:1.55;color:#414437}
.step-length {gap:5px;color:#5e614f;font-size:.83rem;margin-top:7px}
.step-length svg {width:14px;height:14px}
.method-photo {width:100%;aspect-ratio:1.4;object-fit:cover;border-radius:10px;margin-top:3px}
.sheet-notes {margin:20px 0 0;color:var(--sub);font-size:.92rem;line-height:1.5}
.card-open>.dish-card-photo {display:block;width:100%;height:125px;object-fit:cover}
.hero-feature {width:100%;height:100%;position:absolute;inset:0;object-fit:cover;object-position:center 52%}
.hero-link {position:absolute;left:14px;bottom:12px;display:inline-flex;align-items:center;gap:6px;background:#fffdf5;color:#254b38;border:0;border-radius:8px;padding:9px 12px;min-height:42px;font-weight:710;box-shadow:0 2px 10px #28221530}
.day-dialog {max-width:460px}
.day-dialog .modal-body>p {color:var(--sub);margin:0 0 12px;line-height:1.45}
.day-choice {display:flex;justify-content:space-between;text-align:left;align-items:center;gap:12px;padding:12px;width:100%;min-height:48px;border:1px solid var(--edge);border-radius:9px;background:var(--paper);margin:6px 0}
.day-choice span {font-size:.89rem;text-align:right;color:var(--sub)}
.day-choice:hover {border-color:var(--pine);background:var(--mint)}
.cook-dialog {width:min(880px,calc(100% - 26px));background:var(--paper);border:1px solid #dcdace;border-radius:20px;max-height:92dvh}
.cook-top,.cook-foot {justify-content:space-between;gap:12px;padding:13px 23px}
.cook-top>span {font-weight:700;color:var(--pine);line-height:1.35}
.cook-top .sheet-tool {padding:6px;min-width:44px;justify-content:center}
.cook-progress {display:flex;gap:4px;margin:0 23px}
.cook-progress i {height:4px;border-radius:2px;flex:1;background:#dce2d5}
.cook-progress i.active {background:var(--pine)}
.cook-main {padding:23px}
.cook-main.has-image {display:grid;grid-template-columns:minmax(160px,.72fr) minmax(0,1.32fr);gap:24px}
.cook-photo {width:100%;max-height:320px;height:auto;aspect-ratio:1;object-fit:cover;border-radius:13px}
.cook-index {color:var(--pine);font-weight:700;font-size:.86rem;margin:0 0 8px}
.cook-copy h2 {font:600 clamp(1.8rem,3.6vw,2.6rem)/1.08 var(--serif);letter-spacing:-.04em;margin:0 0 12px}
.cook-instruction {font-size:1.1rem;color:var(--text)}
.cook-ingredients {background:#eef1e6;border-radius:10px;padding:12px 14px;margin-top:15px}
.cook-ingredients h3,.cook-ingredients summary {font:700 .94rem var(--sans);letter-spacing:0;color:var(--pine)}
.cook-ingredients ul {display:flex;flex-wrap:wrap;gap:4px 14px;margin-top:7px}
.cook-ingredients li {display:flex;gap:6px;align-items:baseline;font-size:.92rem;line-height:1.4}
.cook-ingredients li b {white-space:nowrap;color:var(--pine)}
.timer-presets {gap:6px;flex-wrap:wrap;margin-top:12px}
.timer-pill,.minor,.free-timer summary {border:1px solid #c9b99b;border-radius:8px;padding:7px 10px;color:#67491b;background:#fff7e9;min-height:43px;font-size:.88rem;font-weight:700;gap:6px}
.free-timer {margin-top:12px}
.free-timer summary {width:fit-content;cursor:pointer}
.free-timer form {display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:8px}
.free-timer input {width:68px;border:1px solid var(--edge);border-radius:7px;padding:7px;background:white}
.live-timer {margin-top:11px;border:1px solid #d6c8a7;border-radius:10px;padding:9px 12px;display:flex;align-items:center;gap:7px 12px;flex-wrap:wrap;background:#fff4dc;color:#5d411a}
.live-timer>span {gap:5px}.live-timer strong {font-variant-numeric:tabular-nums;font-size:1.15rem}
.live-timer>div {display:flex;gap:5px}.live-timer .minor {background:var(--paper)}
.cook-foot {position:sticky;bottom:0;background:var(--paper);border-top:1px solid var(--edge);z-index:2;padding-block:12px}
@media(max-width:820px) {
  .dish-copy {padding:23px}.dish-copy h1{font-size:clamp(2.4rem,5.3vw,3.8rem)}
  .dish-facts {gap:10px 16px;margin:15px 0}.sheet-body {gap:22px;grid-template-columns:minmax(220px,.84fr) minmax(0,1.32fr)}
  .ingredient-panel{padding:16px}.method-steps li:has(.method-photo){grid-template-columns:27px minmax(0,1fr)}.method-photo{display:none}
}
@media(max-width:650px) {
  .recipe-sheet{margin-bottom:32px}.sheet-tools{padding:7px 0;gap:4px}.sheet-tools>div{gap:0}.sheet-tool,.sheet-back{font-size:.86rem;padding:6px;gap:5px}
  .sheet-back{padding-left:0}.dish-hero.with-photo{grid-template-columns:1fr}
  .dish-hero{border-radius:16px}.dish-photo-wrap{min-height:0;aspect-ratio:2.14}.dish-copy{padding:18px 18px 20px}
  .dish-tags{margin-bottom:9px}.dish-copy h1{font-size:clamp(2.25rem,9vw,3.5rem);max-width:18ch}.dish-intro{margin-top:9px}
  .sheet-actions{width:100%}.sheet-button{padding:9px 11px}.sheet-body{grid-template-columns:1fr;gap:23px;margin-top:18px}
  .method-steps li:has(.method-photo){grid-template-columns:27px minmax(0,1fr) 72px;gap:8px}.method-photo{display:block}
  .step-number{width:27px;height:27px}.method-text h3{font-size:1.1rem}.ingredient-panel{padding:16px}
  .cook-dialog{width:calc(100% - 12px);max-height:96dvh;border-radius:14px}.cook-main,.cook-top,.cook-foot{padding:12px 15px}
  .cook-progress{margin-inline:15px}.cook-main.has-image{grid-template-columns:1fr;gap:12px}.cook-photo{aspect-ratio:2.6;max-height:155px}
  .cook-instruction{font-size:1.04rem}.cook-foot .sheet-button{flex:1}.card-open>.dish-card-photo{height:103px}
}
@media(max-width:380px){.method-steps li:has(.method-photo){grid-template-columns:27px minmax(0,1fr)}.method-photo{display:none}.sheet-actions .sheet-button{flex:1}.dish-facts{gap:10px}}
@media print {
  @page{margin:14mm}
  body:has(#view-fiche:not([hidden])) {background:white!important;color:black}
  body:has(#view-fiche:not([hidden])) :is(.sheet-tools,.sheet-actions,.portion-control,.ingredients-count,.footer,.skip,.toast,dialog){display:none!important}
  .wrap,.recipe-sheet{width:100%;max-width:none;margin:0}.dish-hero,.dish-hero.with-photo{background:white;border:0;grid-template-columns:34% 1fr}
  .dish-photo-wrap{min-height:0;aspect-ratio:1.55}.dish-copy{padding:0 0 0 15px}.dish-copy h1{font-size:25pt}.dish-intro,.method-text p,.ingredient-line{font-size:10.5pt}
  .dish-facts{margin:10px 0}.sheet-body{display:grid;grid-template-columns:32% 1fr;gap:16px;margin-top:16px}
  .ingredient-panel{padding:10px;background:white}.ingredient-line{grid-template-columns:1fr auto;min-height:27px;padding:5px 0}
  .tick-box,.ingredient-line input,.method-photo{display:none!important}.ingredient-name{text-decoration:none!important;color:black!important}
  .method-steps li,.method-steps li:has(.method-photo){grid-template-columns:26px 1fr;gap:8px;padding:10px 0;break-inside:avoid}
  .step-number{width:24px;height:24px}.method-panel h2,.ingredient-panel h2{font-size:18pt}.dish-hero{break-inside:avoid}
}

.movie-access{display:inline-flex;align-items:center;gap:8px;margin-top:8px;color:#28583a;text-decoration:underline;text-underline-offset:3px}.movie-access span{font-size:.8em}@media print{.movie-access{display:none!important}}

.recipe-movie{margin-top:1rem}.recipe-movie summary{cursor:pointer;color:#28583a;font-weight:650;text-decoration:underline;text-underline-offset:3px}.recipe-movie video{display:block;width:min(100%,19rem);aspect-ratio:9/16;margin-top:.7rem;border-radius:.75rem;background:#1a211b;object-fit:contain}@media print{.recipe-movie{display:none}}
