/* À table : papier, photographie et gestes simples. */
:root {
  --paper: #f4f2ea;
  --surface: #fffef9;
  --ink: #252b24;
  --muted: #65695e;
  --line: #d7d8ce;
  --accent: #ecc344;
  --soft: #e8e9df;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'DM Sans', Arial, sans-serif;
  --page-width: 1328px;
  --page-gutter: 40px;
  --focus: #806014;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100svh; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); font: 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
main { flex: 1; min-width: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, a, input, summary { touch-action: manipulation; }
button, summary { cursor: pointer; }
button { color: inherit; }
textarea { resize: vertical; }
img { display: block; max-width: 100%; }
svg { flex-shrink: 0; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { overflow-wrap: anywhere; }
h1, h2 { text-wrap: balance; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
#main:focus { outline: none; }
[hidden] { display: none !important; }
::selection { color: var(--ink); background: #f2dfa0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 60; border-radius: 8px; background: var(--ink); color: white; padding: 12px 18px; }
.skip-link:focus { top: 12px; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 16px; color: var(--muted); font-size: 13px; font-weight: 500; letter-spacing: .02em; }
.brand { font: 700 36px/1.1 var(--serif); letter-spacing: -2px; }
.brand span { color: #a77803; }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; gap: 20px; min-height: 48px; padding: 13px 22px; border: 1px solid transparent; border-radius: 10px; font: 500 14px/1.5 var(--sans); text-align: center; transition: background-color .18s ease; }
.primary { background: var(--ink); color: #fff; }
.primary:hover { background: #424b3f; }
.secondary { background: var(--surface); border-color: var(--line); }
.text-link, .text-button { font: 500 13px/1.5 var(--sans); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #a1a493; }
.text-link { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; }
.text-link:hover, .text-button:hover { text-decoration-color: currentColor; }
.text-button { padding: 10px 0; min-height: 44px; color: var(--ink); background: none; border: 0; }
button:disabled { cursor: default; opacity: .5; }
.primary:disabled { cursor: wait; }
.home, .recipe-page { width: calc(100% - var(--page-gutter) * 2); max-width: var(--page-width); margin: 0 auto; padding: 64px 0 72px; }
.section-heading { margin: 0 0 14px; font: 500 clamp(28px, 3vw, 36px)/1.2 var(--serif); letter-spacing: -.7px; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: calc(100% - var(--page-gutter) * 2); max-width: var(--page-width); margin: 0 auto; padding: 28px 0 32px; border-top: 1px solid var(--line); }
.site-footer .brand { font-size: 28px; white-space: nowrap; }
.site-footer p { margin: 0; color: var(--muted); font-size: 13px; }
.site-footer > span { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* Le carnet : les images donnent envie, les repères restent discrets. */
.intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 56px; }
.intro h1 { margin: 0; font: 500 clamp(40px, 5vw, 70px)/1.1 var(--serif); letter-spacing: -2.2px; }
.intro-side { max-width: 360px; margin: 0 0 3px; color: var(--muted); font-size: 15px; }
.collection-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 24px; }
.collection-toolbar h2 { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 16px; font-weight: 500; text-wrap: wrap; }
.count-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; color: var(--muted); }
.search-form { width: min(100%, 440px); }
.search-control { display: flex; align-items: center; gap: 10px; padding: 5px 6px 5px 14px; border: 1px solid #8c9082; border-radius: 12px; background: var(--surface); }
.search-control:focus-within { border-color: var(--focus); box-shadow: 0 0 0 2px rgba(128, 96, 20, .12); }
.search-icon { color: var(--muted); }
.search-control input { min-width: 0; width: 100%; padding: 8px 0; border: 0; background: transparent; color: var(--ink); font-size: 14px; }
.search-submit { min-height: 44px; border: 0; padding: 8px 12px; border-radius: 8px; font-size: 12px; font-weight: 600; background: var(--soft); }
.search-submit:hover { background: #dcdfd1; }
.search-context { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 24px; font-size: 14px; }
.search-context p { margin: 0; overflow-wrap: anywhere; }
.recipe-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 40px 28px; }
.recipe-card { display: block; grid-column: span 2; min-width: 0; border-radius: 16px; }
.recipe-card:nth-child(-n+2) { grid-column: span 3; }
.card-image { position: relative; aspect-ratio: 1.32; overflow: hidden; border-radius: 16px; background: var(--soft); }
.recipe-card:nth-child(-n+2) .card-image { aspect-ratio: 1.72; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card-time { position: absolute; top: 16px; left: 16px; padding: 5px 11px; border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 500; }
.card-arrow { position: absolute; bottom: 16px; right: 16px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--ink); background: var(--surface); font-size: 24px; transition: background-color .18s ease; }
@media (hover: hover) { .recipe-card:hover .card-image img { transform: scale(1.025); } .recipe-card:hover .card-arrow { background: var(--accent); } }
.card-copy { padding: 18px 2px 0; }
.card-origin { margin: 0 0 8px; color: var(--muted); font-size: 12px; }
.card-copy h3 { font: 500 clamp(23px, 2.25vw, 31px)/1.2 var(--serif); letter-spacing: -.6px; margin: 0 0 9px; }
.card-description { font-size: 14px; line-height: 1.55; margin: 0; color: var(--muted); }
.card-rating { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 12px; }
.card-rating strong { font-weight: 500; }
.card-rating > .muted:last-child:not(:nth-child(2)) { margin-left: 4px; }
.rating-star { color: #806014; font-size: 19px; line-height: 1; }
.rating-star-empty { color: var(--muted); }
.image-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 100%; min-height: 200px; padding: 24px; text-align: center; color: var(--muted); background: var(--soft); font-size: 13px; }
.placeholder-mark, .empty-mark { font: 500 64px/1 var(--serif); letter-spacing: -4px; color: #7c816f; }
.collection-invite { display: flex; align-items: center; justify-content: center; gap: 20px; margin: 42px 0 0; padding-top: 26px; border-top: 1px solid var(--line); }
.collection-invite p { margin: 0; font-size: 14px; color: var(--muted); }
.empty-state { grid-column: 1/-1; text-align: center; padding: 64px 24px; border: 1px dashed #b5b9a9; border-radius: 18px; }
.empty-mark { display: block; margin-bottom: 20px; }
.empty-state h3 { font: 500 32px/1.2 var(--serif); margin-bottom: 16px; }
.empty-state p { max-width: 420px; margin: 0 auto 24px; color: var(--muted); }

/* La recette : repères rapides, ingrédients à cocher, étapes aérées. */
.recipe-page { padding-top: 28px; }
.breadcrumbs { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; font-size: 13px; }
.breadcrumbs a, .back-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; }
.edit-link { padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; }
.edit-link:hover { background: var(--surface); }
.recipe-hero { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 56px; }
.hero-image { position: relative; aspect-ratio: 1.12; overflow: hidden; border-radius: 20px; background: var(--soft); }
.hero-image img { width: 100%; height: 100%; object-fit: cover; }
.image-label { position: absolute; bottom: 16px; left: 16px; max-width: calc(100% - 32px); padding: 5px 10px; border-radius: 6px; font-size: 10px; color: var(--ink); background: var(--surface); }
.hero-copy h1 { margin: 0 0 18px; font: 500 clamp(36px, 4vw, 56px)/1.08 var(--serif); letter-spacing: -1.6px; }
.hero-copy .subtitle { font: 400 21px/1.4 var(--serif); margin-bottom: 20px; color: var(--muted); }
.hero-copy .description { color: var(--muted); font-size: 15px; max-width: 520px; margin-bottom: 24px; }
.recipe-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 24px 0; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.recipe-stats dt { margin-bottom: 6px; font-size: 12px; color: var(--muted); }
.recipe-stats dd { margin: 0; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; }
.recipe-shortcuts { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 32px 0; padding: 10px 0; border-block: 1px solid var(--line); font-size: 13px; }
.recipe-shortcuts > span { color: var(--muted); margin-right: auto; padding-right: 24px; }
.recipe-shortcuts a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: 8px; }
.recipe-shortcuts a:hover { background: var(--surface); }
.recipe-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 28px; padding: 24px 28px; background: var(--soft); border-radius: 14px; }
.recipe-info h2 { margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.recipe-info p { margin: 0; font-size: 14px; color: #535a4c; }
.recipe-body { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.45fr); gap: 64px; margin-top: 48px; align-items: start; }
.ingredients { padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.ingredients .section-heading { font-size: 30px; }
.servings-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--soft); font-size: 12px; }
.ingredients-intro { margin: 18px 0 8px; font-size: 13px; color: var(--muted); }
.ingredient-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 20px; }
.ingredient-tools .text-button { font-size: 12px; }
.ingredient-group { margin: 24px 0 0; }
.ingredient-group h3 { font-size: 14px; margin: 0 0 8px; }
.ingredient { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 10px 0; border-bottom: 1px solid #eceee5; cursor: pointer; font-size: 14px; line-height: 1.55; }
.ingredient input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: #536043; }
.ingredient span { overflow-wrap: anywhere; }
.ingredient:has(input:checked) span { color: var(--muted); text-decoration: line-through; text-decoration-color: #8d947f; }
.measure-note { margin: 24px 0 0; font-size: 12px; color: var(--muted); }
.preparation-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 8px; }
.preparation-head > span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.steps { list-style: none; padding: 0; margin: 0; }
.step { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 18px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.step-number { display: grid; place-items: center; align-self: start; width: 36px; height: 36px; border: 1px solid #c9cebd; border-radius: 50%; font-size: 12px; font-weight: 500; }
.step-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 12px; }
.step h3 { margin: 0; font-size: 17px; font-weight: 600; }
.step p { margin: 0; color: #535a4c; font-size: 15px; line-height: 1.8; }
.step-time { display: inline-block; padding: 3px 9px; border-radius: 6px; background: var(--soft); font-size: 11px; }
.cook-note { margin-top: 28px; padding: 24px; background: #efe6c7; border-radius: 12px; }
.cook-note h3 { margin: 0 0 10px; font: 500 24px/1.2 var(--serif); }
.cook-note p { font-size: 14px; margin: 0; }
.ingredients .cook-note { padding: 18px; }
.source-note { margin: 20px 0 0; color: var(--muted); font-size: 12px; }
.source-note a { text-decoration: underline; text-underline-offset: 3px; }

/* Avis : une note suffit, chacun conserve son propre retour. */
.reviews-section { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 64px; margin-top: 64px; padding-top: 48px; border-top: 1px solid var(--line); }
.reviews-list > p { font-size: 14px; }
.review-form { padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.review-form h3 { font: 500 27px/1.2 var(--serif); margin: 0 0 26px; }
.review-form .primary { width: 100%; }
.rating-field { padding: 0; border: 0; margin: 0 0 24px; min-width: 0; }
.rating-field legend { font-size: 14px; margin-bottom: 12px; }
.rating-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.rating-option { position: relative; display: grid; place-items: center; min-height: 48px; border: 1px solid #8c9082; border-radius: 10px; font-size: 13px; background: var(--surface); cursor: pointer; }
.rating-option input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.rating-option:has(input:checked) { background: var(--accent); border-color: #806014; font-weight: 600; }
.rating-option:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.review { padding: 24px 0; border-bottom: 1px solid var(--line); }
.review-heading, .review-author { display: flex; align-items: center; gap: 12px; }
.review-heading { justify-content: space-between; }
.review-author { min-width: 0; }
.review-author strong { font-size: 14px; overflow-wrap: anywhere; }
.review small { display: block; font-size: 12px; color: var(--muted); }
.member-avatar { display: inline-grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; background: #e4e7d7; border-radius: 50%; font: 500 22px var(--serif); }
.review-score { white-space: nowrap; font-size: 13px; }
.review-score > span { color: #806014; }
.review > p { margin: 18px 0 0; overflow-wrap: anywhere; font-size: 15px; }
.review-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; margin-top: 12px; }
.review-actions form { margin: 0; }
.review-actions .text-button, .review-actions .text-link { font-size: 12px; }
.reviews-empty { display: flex; align-items: center; gap: 18px; padding: 24px 0; }
.reviews-empty p { margin: 0; font-size: 14px; }
.reviews-empty .rating-star { font-size: 34px; }

/* Saisie : des groupes nets, des aides au bon endroit. */
.field { margin: 0 0 24px; min-width: 0; }
.field-heading { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.field-heading label { font-size: 14px; font-weight: 500; }
.required-mark { font-size: 14px; color: #806014; }
.optional-label { font: 400 11px/1.4 var(--sans); color: var(--muted); }
.field-heading .optional-label { margin-left: auto; }
.field input:not([type=checkbox]):not([type=radio]), .field textarea, .field select, .chat-form textarea { display: block; width: 100%; max-width: 100%; padding: 12px 14px; border: 1px solid #8c9082; border-radius: 9px; background: var(--surface); color: var(--ink); font-size: 16px; }
.field input::placeholder, .field textarea::placeholder, .search-control input::placeholder { color: #6d7565; opacity: 1; }
.field textarea { min-height: 110px; line-height: 1.65; }
.field small, .helptext { display: block; font-size: 12px; color: var(--muted); line-height: 1.6; margin: 8px 0 0; }
.field .helptext ul, .field ul { padding-left: 20px; }
.field input[type=file] { padding: 8px; font-size: 12px; }
.field input[type=file]::file-selector-button { font: 500 12px var(--sans); min-height: 40px; padding: 8px 12px; margin-right: 10px; border: 0; border-radius: 6px; background: var(--soft); color: var(--ink); cursor: pointer; }
.field [aria-invalid=true] { border-color: #962d26 !important; }
.errorlist { list-style: none; padding: 0; margin: 8px 0 0; color: #962d26; font-size: 13px; }
.error-summary { padding: 18px 20px; background: #fae6e0; color: #76291f; border: 1px solid #c8867f; border-radius: 12px; margin-bottom: 28px; font-size: 14px; }
.error-summary p { margin-bottom: 8px; }
.error-summary ul { padding-left: 20px; margin-bottom: 0; }
.error-summary a { text-decoration: underline; text-underline-offset: 3px; }
.messages { width: calc(100% - var(--page-gutter) * 2); max-width: var(--page-width); margin: 24px auto 0; }
.notice { padding: 14px 20px; border: 1px solid #a9b79b; border-radius: 10px; background: #e7edde; font-size: 14px; }
.notice.error { background: #fae6e0; border-color: #c8867f; }
.editor-page { width: calc(100% - var(--page-gutter) * 2); max-width: 860px; margin: 28px auto 80px; }
.back-link { font-size: 13px; }
.editor-heading { max-width: 620px; margin: 24px 0 36px; }
.editor-heading h1 { font: 500 clamp(34px, 4vw, 48px)/1.15 var(--serif); letter-spacing: -1px; margin: 0 0 18px; }
.editor-heading > p:last-child { color: var(--muted); font-size: 15px; }
.form-required-note { font-size: 12px; color: var(--muted); margin-bottom: 24px; }
.editor-section { min-width: 0; padding: 0 28px 12px; margin: 0 0 32px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.editor-section legend { padding: 0 10px; margin-left: -10px; font: 500 27px/1.3 var(--serif); }
.editor-section legend .optional-label { margin-left: 8px; }
.section-help { margin: 14px 0 24px; font-size: 13px; color: var(--muted); }
.form-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.photo-upload { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 24px; }
.photo-preview-frame { width: 180px; overflow: hidden; border-radius: 10px; background: var(--soft); }
.photo-preview { width: 100%; aspect-ratio: 1.2; object-fit: cover; }
.photo-upload-fields { flex: 1; min-width: min(100%, 260px); }
.photo-feedback { color: var(--muted); font-size: 12px; margin: -12px 0 24px; overflow-wrap: anywhere; }
.extra-details { margin: 0 0 32px; padding: 18px 28px; border: 1px solid var(--line); border-radius: 14px; }
.extra-details summary { display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: 14px; font-weight: 500; list-style: none; }
.extra-details summary::-webkit-details-marker { display: none; }
.extra-details summary::after { content: '+'; margin-left: auto; font-size: 24px; font-weight: 400; }
.extra-details[open] summary::after { content: '−'; }
.extra-details[open] summary { margin-bottom: 18px; }
.extra-details > p { font-size: 14px; }
.form-actions { display: flex; align-items: center; gap: 24px; padding-top: 4px; }

/* Connexion et compte : mêmes matières, informations regroupées. */
.auth-page { width: calc(100% - var(--page-gutter) * 2); max-width: 500px; margin: 56px auto 72px; padding: 36px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 8px 32px rgba(37, 43, 36, .035); }
.auth-page h1 { font: 500 clamp(30px, 3.5vw, 40px)/1.15 var(--serif); letter-spacing: -1px; margin-bottom: 18px; }
.auth-page > p { font-size: 14px; color: var(--muted); }
.auth-page form { margin-top: 24px; }
.auth-page .primary { width: 100%; }
.auth-footnote { font-size: 12px !important; margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }
.auth-alternatives { margin: 24px 0 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.auth-alternatives p { font-size: 13px; margin-bottom: 4px; }
.auth-page details { font-size: 13px; }
.auth-page summary { min-height: 44px; padding: 10px 0; }
.totp-qr { width: 220px; height: 220px; margin: 24px auto; object-fit: contain; background: white; }
.secret-key { overflow-wrap: anywhere; font-family: monospace; }
.account-page { width: calc(100% - var(--page-gutter) * 2); max-width: 780px; margin: 28px auto 80px; }
.account-heading { display: flex; align-items: center; gap: 20px; margin: 24px 0 32px; }
.account-heading .member-avatar { width: 72px; height: 72px; font-size: 38px; }
.account-heading .eyebrow { margin-bottom: 4px; }
.account-heading h1 { margin: 0; font: 500 44px/1.15 var(--serif); letter-spacing: -1px; }
.account-panel { padding: 32px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.panel-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; justify-content: space-between; }
.panel-heading h2 { font: 500 25px/1.2 var(--serif); margin: 0; }
.status-badge { display: inline-block; padding: 5px 10px; border-radius: 999px; background: #e7edde; color: #3d5333; font-size: 11px; }
.account-details { margin: 24px 0; }
.account-details > div { display: grid; grid-template-columns: 1fr 1.2fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.account-details dt { color: var(--muted); }
.account-details dd { margin: 0; overflow-wrap: anywhere; }
.account-help { margin: 24px 0 0; font-size: 13px; color: var(--muted); }
.admin-link { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 56px; margin-top: 20px; padding: 16px 24px; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; }
.admin-link:hover { background: var(--surface); }

/* Une aide à portée de main, dans les couleurs du carnet. */
.has-chat { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
.has-chat :is(a, button, input, textarea, summary) { scroll-margin-bottom: 100px; }
.chat-widget {
  --chat-bottom: max(20px, env(safe-area-inset-bottom, 0px));
  position: fixed; z-index: 45;
  right: max(24px, env(safe-area-inset-right, 0px)); bottom: var(--chat-bottom);
}
.chat-launcher {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 56px; padding: 12px 20px; list-style: none;
  border: 1px solid #495143; border-radius: 999px; background: var(--ink); color: var(--surface);
  box-shadow: 0 6px 24px rgba(37, 43, 36, .18), inset 0 1px rgba(255, 255, 255, .14);
  font-size: 14px; font-weight: 500; transition: background-color .18s ease;
}
.chat-launcher::-webkit-details-marker { display: none; }
.chat-launcher:hover, .chat-widget[open] .chat-launcher { background: #3b4436; }
.chat-launcher > svg, .chat-launcher-dot { color: var(--accent); }
.chat-launcher-dot { margin-left: 1px; }
.chat-panel {
  position: absolute; right: 0; bottom: 70px; width: min(390px, calc(100vw - 32px));
  max-height: calc(100vh - 110px - var(--chat-bottom));
  max-height: calc(100dvh - 110px - var(--chat-bottom));
  overflow: auto; overscroll-behavior: contain;
  border: 1px solid #fffef9; border-radius: 24px; background: var(--surface);
  box-shadow: 0 16px 60px rgba(37, 43, 36, .16), 0 2px 8px rgba(37, 43, 36, .06);
}
.chat-widget[open] .chat-panel { animation: chat-reveal .18s ease-out; }
@keyframes chat-reveal { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.chat-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 20px 16px 20px 24px; border-bottom: 1px solid var(--line); background: #f0efe6; }
.chat-heading > div { min-width: 0; }
.chat-heading h2 { margin: 0 0 8px; font: 500 23px/1.3 var(--serif); text-wrap: wrap; }
.chat-heading h2 > span { color: #997000; }
.chat-heading p { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; color: var(--muted); font-size: 12px; }
.chat-close { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; margin-top: -6px; border: 1px solid transparent; border-radius: 50%; background: transparent; }
.chat-close:hover { border-color: var(--line); background: var(--surface); }
.soon-badge { white-space: nowrap; padding: 2px 8px; border: 1px solid #c5c9b8; border-radius: 999px; font-size: 11px; color: var(--muted); }
.chat-content { padding: 20px 24px 24px; }
.chat-context { margin: 0 0 24px; padding-left: 12px; border-left: 3px solid var(--accent); color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.chat-context strong { display: block; color: var(--ink); font-weight: 500; }
.chat-welcome h3 { margin: 0 0 10px; font: 500 25px/1.25 var(--serif); }
.chat-welcome p { margin: 0; font-size: 14px; }
.chat-unavailable { margin: 24px 0 16px; color: var(--muted); font-size: 12px; }
.chat-composer-preview { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: var(--paper); font-size: 14px; }
.chat-form { margin-top: 24px; }
.chat-form label { display: block; font-size: 14px; margin-bottom: 8px; }
.chat-form textarea { max-height: 180px; }
.chat-form small { display: block; color: var(--muted); font-size: 12px; margin: 8px 0 16px; }
.chat-form .primary { width: 100%; }
.chat-response { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 20px; font-size: 15px; }
.chat-response:empty { margin: 0; }
@supports ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  .chat-panel { background: rgba(255, 254, 249, .94); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
  .chat-heading { background: linear-gradient(120deg, rgba(255, 255, 255, .5), rgba(240, 239, 230, .75)); }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .chat-panel { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .chat-heading { background: var(--paper); }
}
@media (forced-colors: active) {
  .chat-panel { border-color: CanvasText; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .chat-launcher { border-color: ButtonText; }
}

@media (max-width: 1100px) {
  :root { --page-gutter: 28px; }
  .intro h1 { font-size: 54px; }
  .recipe-hero { gap: 32px; }
  .hero-copy h1 { font-size: 42px; }
  .recipe-body { gap: 36px; }
  .ingredients { padding: 22px; }
  .reviews-section { gap: 36px; }
}
@media (max-width: 900px) {
  .intro { align-items: flex-start; flex-direction: column; gap: 20px; margin-bottom: 36px; }
  .intro-side { max-width: 460px; }
  .desktop-break { display: none; }
  .collection-toolbar { align-items: flex-start; flex-direction: column; gap: 20px; }
  .search-form { width: 100%; }
  .recipe-grid { gap: 32px 24px; }
  .recipe-card, .recipe-card:nth-child(-n+2) { grid-column: span 3; }
  .recipe-card:nth-child(-n+2) .card-image { aspect-ratio: 1.32; }
  .recipe-hero { grid-template-columns: 1fr; gap: 28px; }
  .hero-image { aspect-ratio: 1.5; }
  .hero-copy { max-width: 640px; }
  .hero-copy h1 { font-size: 48px; }
  .recipe-body { grid-template-columns: 1fr; }
  .ingredients { padding: 28px; }
  .reviews-section { grid-template-columns: 1fr; gap: 32px; }
  .review-form { max-width: 620px; width: 100%; }
}
@media (max-width: 600px) {
  :root { --page-gutter: 20px; }
  .home { padding-top: 36px; padding-bottom: 48px; }
  .intro h1 { font-size: 42px; letter-spacing: -1.3px; }
  .eyebrow { font-size: 12px; margin-bottom: 12px; }
  .intro-side { font-size: 14px; }
  .search-control { padding-left: 12px; gap: 8px; flex-wrap: wrap; }
  .search-control input { flex: 1; width: 0; font-size: 16px; }
  .search-submit { font-size: 12px; padding-inline: 10px; }
  .search-context { flex-wrap: wrap; gap: 0; }
  .recipe-grid { grid-template-columns: 1fr; gap: 32px; }
  .recipe-card, .recipe-card:nth-child(-n+2) { grid-column: auto; }
  .card-image, .recipe-card:nth-child(-n+2) .card-image { aspect-ratio: 1.35; border-radius: 14px; }
  .card-copy h3 { font-size: 27px; }
  .card-time { top: 12px; left: 12px; }
  .card-arrow { bottom: 12px; right: 12px; }
  .card-copy { padding-top: 14px; }
  .card-rating { margin-top: 12px; }
  .collection-invite { flex-direction: column; gap: 0; margin-top: 32px; }
  .recipe-page { padding-top: 16px; padding-bottom: 48px; }
  .breadcrumbs { gap: 12px; margin-bottom: 20px; font-size: 12px; }
  .hero-image { aspect-ratio: 1.2; border-radius: 16px; }
  .hero-copy h1 { font-size: 40px; letter-spacing: -1.1px; }
  .hero-copy .subtitle { font-size: 20px; }
  .recipe-stats { gap: 12px; }
  .recipe-stats dd { font-size: 13px; }
  .hero-actions { gap: 12px 20px; }
  .recipe-shortcuts { gap: 4px; margin: 28px 0; }
  .recipe-shortcuts > span { width: 100%; padding: 6px 0; font-size: 12px; }
  .recipe-shortcuts a { padding-inline: 10px; font-size: 12px; }
  .recipe-info { padding: 20px; gap: 20px; }
  .recipe-body { margin-top: 32px; }
  .ingredients { padding: 20px; }
  .ingredient { font-size: 15px; }
  .step { grid-template-columns: 30px minmax(0, 1fr); gap: 12px; padding: 24px 0; }
  .step-number { width: 30px; height: 30px; }
  .step-heading { gap: 8px; }
  .step h3 { font-size: 16px; }
  .step p { font-size: 15px; }
  .reviews-section { padding-top: 32px; margin-top: 40px; }
  .review-form { padding: 20px; }
  .rating-options { gap: 6px; }
  .rating-option { font-size: 12px; }
  .cook-note { padding: 20px; }
  .editor-page, .account-page { margin-top: 20px; margin-bottom: 48px; }
  .editor-heading { margin: 20px 0 32px; }
  .editor-section { padding: 0 18px 4px; }
  .editor-section legend { font-size: 25px; }
  .form-columns { grid-template-columns: 1fr; gap: 0; }
  .extra-details { padding: 14px 18px; }
  .extra-details summary { flex-wrap: wrap; gap: 6px; }
  .form-actions { flex-wrap: wrap; justify-content: space-between; }
  .form-actions .primary { flex: 1; }
  .auth-page { padding: 26px 24px; margin: 36px auto 48px; border-radius: 18px; }
  .auth-page h1 { font-size: 32px; }
  .account-heading { gap: 16px; }
  .account-heading h1 { font-size: 36px; }
  .account-panel { padding: 24px; }
  .account-details > div { grid-template-columns: 1fr; gap: 6px; }
  .account-panel .primary { width: 100%; }
  .chat-widget { right: max(16px, env(safe-area-inset-right, 0px)); --chat-bottom: max(16px, env(safe-area-inset-bottom, 0px)); }
  .chat-launcher { min-height: 52px; padding: 10px 16px; font-size: 13px; }
  .chat-panel { bottom: 64px; border-radius: 20px; }
  .chat-heading { padding-left: 20px; }
  .chat-heading h2 { font-size: 22px; }
  .chat-content { padding: 20px; }
  .site-footer { flex-wrap: wrap; gap: 16px; padding-bottom: 24px; }
  .site-footer p { order: 3; width: 100%; font-size: 12px; }
  .site-footer > span { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 360px) {
  .rating-options { gap: 4px; }
}

/* Verre poli : transparence douce, reflet oblique et liserés lumineux. */
:root {
  --header-top: max(16px, env(safe-area-inset-top, 0px));
  --header-surface: #f7f5ee;
  --header-glass: rgba(247, 245, 238, .68);
  --header-highlight: rgba(255, 255, 255, .72);
  --header-muted: #30372b;
}
html { scroll-padding-top: calc(var(--header-top) + 104px); }
.skip-link { position: fixed; z-index: 60; }
.site-header {
  position: sticky;
  top: var(--header-top);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: calc(100% - 48px);
  max-width: 1328px;
  min-height: 76px;
  margin: var(--header-top) auto 0;
  padding: 12px 24px;
  background: var(--header-surface);
  border: 1px solid var(--header-highlight);
  border-radius: 24px;
  box-shadow:
    0 10px 30px rgba(37, 43, 36, .08),
    0 2px 6px rgba(37, 43, 36, .04),
    inset 0 1px 1px rgba(255, 255, 255, .95),
    inset 0 -1px 1px rgba(255, 255, 255, .45),
    inset 1px 0 1px rgba(255, 255, 255, .5),
    inset -1px 0 1px rgba(255, 255, 255, .25);
}
.header-identity { display: flex; align-items: center; gap: 24px; flex-shrink: 0; }
.site-header .brand { display: inline-flex; align-items: baseline; min-height: 44px; padding: 2px 0; white-space: nowrap; }
.header-caption { max-width: 140px; padding-left: 24px; border-left: 1px solid rgba(37, 43, 36, .15); font-size: 12px; line-height: 1.5; color: var(--header-muted); }
.header-nav { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; min-width: 0; font-size: 13px; }
.header-nav form { margin: 0; }
.header-nav a, .header-nav .text-button, .header-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  line-height: 1.4;
  transition: background-color .18s ease, box-shadow .18s ease;
}
.header-nav a:hover, .header-nav .text-button:hover, .header-toggle:hover { background: rgba(37, 43, 36, .07); }
.header-nav a[aria-current] { background: var(--header-highlight); box-shadow: inset 0 0 0 1px rgba(37, 43, 36, .1); font-weight: 600; }
.header-nav .header-add { background: rgba(236, 195, 68, .28); }
.header-nav .header-add:hover, .header-nav .header-add[aria-current] { background: rgba(236, 195, 68, .48); }
.header-add > span { font-size: 20px; line-height: 1; }
.header-account { overflow-wrap: anywhere; max-width: 180px; }
.header-nav .text-button { font-size: 12px; color: var(--header-muted); }
.header-toggle { font: 500 13px var(--sans); color: var(--ink); border: 1px solid rgba(37, 43, 36, .12); background: var(--header-highlight); cursor: pointer; }
.header-toggle svg { flex: none; }
.header-toggle[aria-expanded="true"] { background: var(--soft); }
.header-nav[hidden], .header-toggle[hidden] { display: none; }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header {
    background:
      linear-gradient(115deg, rgba(255, 255, 255, .38), rgba(255, 255, 255, .04) 36%, rgba(255, 255, 255, .02) 65%, rgba(255, 255, 255, .22)),
      linear-gradient(180deg, rgba(255, 255, 255, .18), transparent 48%, rgba(255, 255, 255, .06)),
      var(--header-glass);
    -webkit-backdrop-filter: blur(18px) saturate(1.28);
    backdrop-filter: blur(18px) saturate(1.28);
  }
}
@media (max-width: 1100px) {
  .header-caption { display: none; }
  .site-header { padding-inline: 20px; }
}
@media (max-width: 800px) {
  :root { --header-top: max(12px, env(safe-area-inset-top, 0px)); }
  html { scroll-padding-top: calc(var(--header-top) + 88px); }
  .site-header { width: calc(100% - 24px); min-height: 66px; padding: 10px 16px; border-radius: 22px; flex-wrap: wrap; gap: 10px; }
  .site-header .brand { font-size: 31px; padding-top: 4px; }
  .header-nav { width: 100%; justify-content: flex-start; }
  /* Sans JavaScript, tous les liens restent visibles sans masquer le contenu au défilement. */
  .site-header:has(.header-nav):not(.header-enhanced) { position: relative; top: auto; }
  .header-enhanced .header-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 100%;
    max-height: calc(100dvh - var(--header-top) - 100px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--header-highlight);
    border-radius: 22px;
    background: var(--header-surface);
    box-shadow: 0 16px 32px rgba(37, 43, 36, .12);
  }
  .header-enhanced .header-nav[hidden] { display: none; }
  .header-enhanced .header-nav a { justify-content: flex-start; border-radius: 12px; padding: 12px 16px; max-width: none; }
  .header-enhanced .header-nav form { border-top: 1px solid var(--line); padding-top: 8px; }
  .header-enhanced .header-nav .text-button { justify-content: flex-start; width: 100%; padding-inline: 16px; border-radius: 12px; }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .site-header { background: var(--header-surface); -webkit-backdrop-filter: none; backdrop-filter: none; border-color: var(--line); box-shadow: 0 4px 16px rgba(37, 43, 36, .06); }
}
@media (prefers-reduced-motion: reduce) {
  .header-nav a, .header-nav .text-button, .header-toggle { transition: none; }
}
@media (forced-colors: active) {
  .site-header, .header-enhanced .header-nav { background: Canvas; border: 1px solid CanvasText; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
  .header-nav a[aria-current] { outline: 1px solid CanvasText; }
}

.chat-form .chat-web-option { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 8px 0 0; font-size: 13px; cursor: pointer; }
.chat-web-option input { width: 18px; height: 18px; accent-color: var(--ink); }
.chat-feedback { margin-top: 16px; color: var(--muted); font-size: 13px; }
.chat-feedback:empty { margin: 0; }
.chat-response a, .chat-sources a { text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.chat-sources { margin: 16px 0 0; padding-left: 18px; font-size: 12px; }
.chat-sources a { display: inline-block; padding-block: 6px; }

.install-panel { margin-top: 24px; }
.install-panel > p { font-size: 14px; }
.install-panel .account-help, .install-status { color: var(--muted); font-size: 13px; }
.install-status { margin: 16px 0; }
.install-status:empty { margin: 0; }
.install-help { margin-top: 16px; }
.install-help summary { min-height: 44px; padding: 10px 0; font-size: 14px; font-weight: 500; }
.install-help p { margin: 12px 0; font-size: 14px; }
