/* Blocs éditoriaux en deux colonnes */
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; padding-block: var(--gap); }
.duo__text .lede { margin-top: 24px; }
.duo__text .note { margin-top: 20px; }
.duo__visual { aspect-ratio: 1; display: grid; place-items: center; padding: clamp(24px, 4vw, 48px); overflow: hidden; }

/* La tasse vue de dessus : on peut la touiller */
.cup { width: min(100%, 400px); touch-action: pan-y; }
.cup svg { width: 100%; height: auto; overflow: visible; }
.cup__saucer circle { fill: var(--sable); stroke: var(--nuit); stroke-width: 1.5; }
.cup__saucer circle + circle { fill: none; stroke: var(--sable-ombre); }
.cup__spoon ellipse, .cup__spoon path { fill: var(--sable); stroke: var(--nuit); stroke-width: 1.5; stroke-linecap: round; }
.cup__sugar { fill: var(--sable); stroke: var(--nuit); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; transform: rotate(14deg); transition: transform .6s var(--ease); }
.cup:hover .cup__sugar { transform: rotate(104deg) scale(1.12); }
.cup__handle, .cup__body { fill: var(--sable); stroke: var(--nuit); stroke-width: 1.5; }
.cup__coffee { fill: var(--nuit); }
.cup__swirl { transform-box: view-box; transform-origin: 200px 200px; will-change: transform; }
.cup__swirl path { fill: none; stroke: var(--sable); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 1 1.1; }
.js .cup__swirl path { stroke-dashoffset: 1.05; }
.js .is-in .cup__swirl path { stroke-dashoffset: 0; transition: stroke-dashoffset 2.4s var(--ease) .5s; }
.cup__ripples circle { fill: none; stroke: var(--sable); stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center; }

/* Le caffè latte en trois couches : espresso vert nuit, lait, mousse crème */
.latte { width: min(100%, 360px); }
.latte svg { width: 100%; height: auto; overflow: visible; }
.latte__verre { fill: none; stroke: var(--nuit); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.latte__l { transform-box: fill-box; transform-origin: 50% 100%; transition: transform 1s var(--ease) calc(var(--i, 0) * 420ms); }
.latte__l--espresso { fill: var(--nuit); }
.latte__l--lait { fill: var(--cafe-lait); }
.latte__l--mousse { fill: var(--creme); }
.latte__tag path { fill: none; stroke: var(--nuit); stroke-width: 1; }
.latte__tag text { font: 400 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; fill: var(--nuit); }
.latte__tag { transition: opacity .5s calc(var(--i, 0) * 420ms + .5s); }
.js .latte:not(.is-full) .latte__l { transform: scaleY(0); transition: none; }
.js .latte:not(.is-full) .latte__tag { opacity: 0; transition: none; }
.latte[data-mode="espresso"] .latte__l--lait, .latte[data-mode="espresso"] .latte__l--mousse { transform: scaleY(0); transition-delay: 0s; }
.latte[data-mode="espresso"] .latte__tag:not(.latte__tag--espresso) { opacity: 0; transition-delay: 0s; }
.latte[data-mode="lait"] .latte__l--espresso { transform: scaleY(.35); transition-delay: 0s; }
.cup__ripples circle.go { animation: ripple 1.5s var(--ease) both; }
@keyframes ripple { from { opacity: .9; transform: scale(.4); } to { opacity: 0; transform: scale(5.2); } }

/* Le menu du midi */
.midi { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 80px); align-items: start; padding-block: var(--gap); }
.midi__main .lede { margin-top: 24px; max-width: 54ch; }

.tabs { position: relative; display: flex; gap: clamp(18px, 2.6vw, 36px); margin-top: 40px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: grid; gap: 3px; padding: 8px 0 14px; border: 0; background: none; cursor: pointer; text-align: left; font-size: 16px; line-height: 1.2; color: var(--fg-3); white-space: nowrap; transition: color .3s; }
.tab small { font: 400 11px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.tab:hover, .tab[aria-selected="true"] { color: var(--fg); }
.tabs__bar { position: absolute; left: 0; bottom: 0; width: 1px; height: 2px; background: var(--fg); transform-origin: left; transition: transform .6s var(--ease); }

.dishes { min-height: 320px; }
.dishes__title { padding: 28px 0 12px; font-size: 14px; letter-spacing: 0; color: var(--fg-3); }
.dish { position: relative; isolation: isolate; width: 100%; display: grid; grid-template-columns: 112px 1fr auto; gap: 6px 20px; align-items: baseline; padding: 20px 14px 20px 0; border: 0; background: none; text-align: left; cursor: pointer; opacity: 0; transform: translateY(16px); }
.dish::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 1px; background: var(--line); transform: scaleX(0); transform-origin: left; }
.dish::after { content: ''; position: absolute; inset: 1px 0 0 0; z-index: -1; background: var(--bg-2); border-radius: var(--r); transform: scaleX(0); transform-origin: left; transition: transform .55s var(--ease); }
.dish > * { transition: transform .55s var(--ease), color .3s; }
.dish__name { font: 400 clamp(19px, 1.9vw, 24px)/1.3 var(--display); letter-spacing: -.01em; text-wrap: pretty; }
.dish__price { font: 400 14px/1.4 var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dishes.is-shown .dish { opacity: 1; transform: none; transition: opacity .7s var(--ease) calc(var(--i, 0) * 80ms), transform .8s var(--ease) calc(var(--i, 0) * 80ms); }
.dishes.is-shown .dish::before { transform: none; transition: transform 1s var(--ease) calc(var(--i, 0) * 80ms); }
.dish.is-active::after { transform: none; }
.dish.is-active > .cap, .dish.is-active > .dish__name { transform: translateX(14px); }
.dish.is-active > .cap { color: var(--fg); }

/* L'assiette : elle se redessine selon le plat survolé */
.plate { position: sticky; top: calc(104px + var(--demo-h, 0px)); display: grid; gap: 6px; justify-items: start; padding: 32px; }
.plate svg { width: min(100%, 300px); height: auto; justify-self: center; margin: 12px 0 20px; will-change: transform; }
.plate__rim { fill: var(--creme); stroke: var(--fg); stroke-width: 1.5; }
.plate__rim + .plate__rim { fill: none; stroke: var(--sable-ombre); }
.plate__art { fill: none; stroke: var(--nuit); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity .25s; }
.plate__art > * { stroke-dasharray: 1 1.1; stroke-dashoffset: 1.05; transition: stroke-dashoffset 0s .25s; }
.plate__art.is-on { opacity: 1; transition: opacity .3s .1s; }
.plate__art.is-on > * { stroke-dashoffset: 0; transition: stroke-dashoffset 1.2s var(--ease) .1s; }
.plate__price { display: flex; align-items: baseline; gap: 6px; font: 400 clamp(44px, 5vw, 64px)/1 var(--display); letter-spacing: -.02em; font-variant-numeric: lining-nums tabular-nums; transition: opacity .3s; }
.plate__price small { font-size: .4em; letter-spacing: 0; }
.plate__price.is-empty { opacity: 0; }
.plate__note { font-size: 14px; line-height: 1.4; letter-spacing: 0; color: var(--fg-3); }

/* L'étagère de l'épicerie */
.shelf svg { width: 100%; height: auto; overflow: visible; }
.shelf__line path { fill: none; stroke: var(--fg); stroke-width: 1.5; stroke-linecap: round; }
.shelf__items use { fill: var(--creme); stroke: var(--fg); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; transform-box: fill-box; transform-origin: 50% 100%; }
.shelf__items use:nth-child(3n) { fill: var(--pin); }
.shelf__items use:nth-child(7n + 4) { fill: var(--nuit); }
.js .shelf__items use { opacity: 0; transform: translateY(-28px); }
.js .shelf.is-in .shelf__items use { opacity: 1; transform: none; transition: opacity .4s calc(var(--i, 0) * 55ms + .5s), transform .8s var(--ease) calc(var(--i, 0) * 55ms + .5s); }
@media (hover: hover) {
  .js .shelf.is-in .shelf__items use:hover { transform: translateY(-12px) rotate(-5deg); transition: transform .45s var(--ease); }
}

@media (max-width: 900px) {
  .duo, .midi { grid-template-columns: 1fr; }
  .duo__visual { max-width: 520px; width: 100%; justify-self: center; }
  .plate { position: static; order: -1; grid-template-columns: 120px 1fr; align-items: center; column-gap: 20px; padding: 20px; }
  .plate svg { grid-row: 1 / span 3; margin: 0; width: 120px; }
  .plate__price { font-size: 40px; }
  .midi__main { display: contents; }
  .midi__main > h2 { order: -3; }
  .midi__main > .lede { order: -2; margin-top: 0; }
  .dish { grid-template-columns: 1fr auto; }
  .dish > .cap { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .js .cup__swirl path { stroke-dashoffset: 0; }
  .dish, .js .shelf__items use { opacity: 1; transform: none; }
  .dish::before { transform: none; }
}

/* Photos du menu : elles remplacent le dessin du panneau dès qu'elles sont déclarées dans js/photos.js */
.has-shots { position: relative; padding: 0; overflow: hidden; }
.has-shots > :not(.shot):not(.shots__cap) { display: none; }
.shot { position: absolute; left: 0; top: -4%; width: 100%; height: 108%; object-fit: cover; opacity: 0; clip-path: inset(0 0 100% 0); transform: translateY(var(--py, 0px)); transition: opacity .01s .9s, clip-path .01s .9s; }
.shot.is-on { z-index: 1; opacity: 1; clip-path: inset(0); transition: clip-path .9s var(--ease); }
.shots__cap { position: absolute; left: 12px; bottom: 12px; z-index: 2; max-width: calc(100% - 24px); padding: 6px 8px; border-radius: var(--r); background: var(--nuit); color: var(--sable); }
.soir__shots { aspect-ratio: 4 / 3; max-width: 520px; margin-top: 40px; }

.midi__shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 40px; }
.midi__shots[hidden] { display: none; }
.midi__shots figure { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--r); }
.midi__shots img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.midi__shots figcaption { position: absolute; left: 8px; right: 8px; bottom: 8px; padding: 6px 8px; border-radius: var(--r); background: var(--nuit); color: var(--sable); transform: translateY(calc(100% + 8px)); transition: transform .5s var(--ease); }
.midi__shots figure:hover img { transform: scale(1.07); }
.midi__shots figure:hover figcaption { transform: none; }
.js .midi__shots figure { clip-path: inset(100% 0 0 0); }
.js .midi__shots.is-in figure { clip-path: inset(0); transition: clip-path 1s var(--ease) calc(var(--i, 0) * 90ms); }
@media (hover: none) { .midi__shots figcaption { transform: none; } }
@media (prefers-reduced-motion: reduce) { .js .midi__shots figure { clip-path: none; } .shot { transform: none; } }
@media (max-width: 900px) {
  .midi__shots { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .midi__shots::-webkit-scrollbar { display: none; }
  .midi__shots figure { flex: 0 0 68%; scroll-snap-align: center; }
  .soir__shots { max-width: none; }
}
