/* Noël chez les Rapillard — voir DESIGN.md */
@font-face { font-family: 'Fraunces'; src: url('/fonts/fraunces.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('/fonts/fraunces-italic.woff2') format('woff2'); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'Atkinson'; src: url('/fonts/atkinson-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Atkinson'; src: url('/fonts/atkinson-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Atkinson'; src: url('/fonts/atkinson-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --sapin: #0B2A20;
  --sapin-nuit: #071C15;
  --sapin-leve: #12382B;
  --sapin-clair: #1A4636;
  --filet: #2B5B48;
  --ivoire: #F4ECD8;
  --ivoire-voile: #C9C5AC;
  --or: #D9B45A;
  --or-vif: #F0D58A;
  --or-sourd: #8C7A44;
  --airelle: #B3263A;
  --airelle-nuit: #8E1C2D;
  --titre: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --texte: 'Atkinson', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --vif: cubic-bezier(.2, .8, .2, 1);
  --rebond: cubic-bezier(.3, 1.45, .5, 1);
  --pan: 9px;
  --bas: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--sapin-nuit); }
body {
  margin: 0; min-height: 100dvh;
  background: radial-gradient(120% 70% at 50% 0%, #0F3327 0%, var(--sapin) 48%, var(--sapin-nuit) 100%) fixed;
  color: var(--ivoire); font: 400 17px/1.5 var(--texte);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
h1, h2, h3, p, ul, ol, figure, fieldset { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; touch-action: manipulation; }
a { color: var(--or); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--or-vif); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--or); color: var(--sapin); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

#neige, #confettis { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#neige { z-index: 0; }
#confettis { z-index: 60; }
#app { position: relative; z-index: 1; }

/* ---------- Dessins ---------- */
.picto { width: 32px; height: 32px; fill: none; stroke: var(--or); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.blason { fill: none; stroke: var(--or); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; display: block; }
.blason .fin { stroke-width: 1.25; opacity: .75; }
.blason .gras { stroke-width: 6.5; }
.blason .etoile { stroke-width: 2.25; }
.blason .baies circle { fill: var(--airelle); stroke: var(--or); stroke-width: 1.25; }
.blason.trace .t { stroke-dasharray: 1; stroke-dashoffset: 1; animation: trace .62s var(--vif) forwards; animation-delay: calc(var(--i) * .13s); }
.blason.trace .baies { opacity: 0; animation: fondu .3s ease 1.55s forwards; }
@keyframes trace { to { stroke-dashoffset: 0; } }
@keyframes fondu { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Écran d'ouverture ---------- */
#splash {
  position: fixed; inset: 0; z-index: 80; display: grid; place-content: center; justify-items: center; gap: 18px;
  background: var(--sapin); transition: opacity .45s ease, visibility .45s;
}
#splash .blason { width: min(46vw, 190px); }
#splash p { font: italic 500 22px/1.2 var(--titre); color: var(--ivoire); opacity: 0; animation: fondu .5s ease 1.2s forwards; letter-spacing: .01em; }
#splash.vite .t { animation: none; stroke-dashoffset: 0; }
#splash.vite .baies, #splash.vite p { animation: none; opacity: 1; }
#splash.parti { opacity: 0; visibility: hidden; }

/* ---------- Titres ---------- */
.surtitre { font: 700 13px/1.3 var(--texte); letter-spacing: .16em; text-transform: uppercase; color: var(--or); }
h1 { font: 500 clamp(30px, 8vw, 44px)/1.08 var(--titre); letter-spacing: -.01em; font-variation-settings: 'SOFT' 100, 'WONK' 1; text-wrap: balance; }
h1 em { font-style: italic; color: var(--or); }
h2 { font: italic 500 27px/1.15 var(--titre); font-variation-settings: 'SOFT' 100, 'WONK' 1; text-wrap: balance; }
h3 { font: 700 13px/1.3 var(--texte); letter-spacing: .14em; text-transform: uppercase; color: var(--or); }
.doux { color: var(--ivoire-voile); }
.replique { font: italic 400 19px/1.35 var(--titre); color: var(--ivoire); text-wrap: pretty; }
.filets { display: flex; align-items: center; gap: 12px; color: var(--or); }
.filets::before, .filets::after { content: ''; flex: 1; height: 4px; border-top: 1px solid var(--or-sourd); border-bottom: 1px solid var(--or-sourd); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 22px;
  font: 700 17px/1.2 var(--texte); text-align: center; text-decoration: none; color: var(--ivoire);
  background: var(--sapin-clair);
  clip-path: polygon(var(--pan) 0, calc(100% - var(--pan)) 0, 100% var(--pan), 100% calc(100% - var(--pan)), calc(100% - var(--pan)) 100%, var(--pan) 100%, 0 calc(100% - var(--pan)), 0 var(--pan));
  transition: transform .15s var(--vif), background-color .15s;
}
.btn:active { transform: scale(.97); }
.btn-airelle { background: var(--airelle); }
.btn-airelle:hover { background: var(--airelle-nuit); }
.btn-or { background: var(--or); color: var(--sapin-nuit); }
.btn-or:hover { background: var(--or-vif); }
.btn-ivoire { background: var(--ivoire); color: var(--sapin-nuit); }
.btn-xl { width: 100%; min-height: 60px; font-size: 19px; }
.btn[disabled] { opacity: .45; cursor: default; }
.btn .picto { width: 26px; height: 26px; stroke: currentColor; }
.lien { color: var(--or); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; min-height: 44px; padding: 8px 4px; font-weight: 700; }
.lien.danger { color: var(--ivoire-voile); }
.btn-ajout {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 58px; padding: 10px 16px;
  border: 1.5px dashed var(--or-sourd); border-radius: 3px; color: var(--or); font-weight: 700; font-size: 17px;
  transition: background-color .15s, border-color .15s, transform .15s var(--vif);
}
.btn-ajout:hover { background: rgba(217, 180, 90, .08); border-color: var(--or); }
.btn-ajout:active { transform: scale(.985); }
.btn-ajout .picto { width: 24px; height: 24px; }

/* Pastilles de choix */
.choix { display: flex; flex-wrap: wrap; gap: 8px; }
.choix.file { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 4px 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.choix.file::-webkit-scrollbar { display: none; }
.puce {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 8px 15px; white-space: nowrap; text-decoration: none;
  border: 1px solid var(--filet); border-radius: 3px; background: var(--sapin-leve); color: var(--ivoire); font-size: 16px;
  transition: background-color .15s, border-color .15s, color .15s;
}
.puce .picto { width: 22px; height: 22px; }
.puce b { color: var(--or); font: 600 16px/1 var(--titre); }
.puce b:empty { display: none; }
.puce[aria-pressed='true'], .puce.on, input:checked + .puce { background: var(--or); border-color: var(--or); color: var(--sapin-nuit); font-weight: 700; }
.puce[aria-pressed='true'] .picto, .puce.on .picto, input:checked + .puce .picto { stroke: var(--sapin-nuit); }
input:focus-visible + .puce { outline: 2px solid var(--or-vif); outline-offset: 3px; }
.choix input { position: absolute; opacity: 0; pointer-events: none; }

/* Champs */
.champ { display: grid; gap: 7px; }
.champ > span, legend { font-weight: 700; font-size: 16px; color: var(--ivoire); padding: 0; margin-bottom: 7px; }
.champ > span { margin-bottom: 0; }
.champ small { font-weight: 400; color: var(--ivoire-voile); }
input[type='text'], input[type='search'], input[type='time'], textarea {
  width: 100%; min-height: 54px; padding: 12px 14px; font-size: 18px; color: var(--ivoire);
  background: var(--sapin-nuit); border: 1px solid var(--filet); border-radius: 3px; appearance: none;
}
input::placeholder, textarea::placeholder { color: #8FA394; }
input:focus, textarea:focus { outline: none; border-color: var(--or); box-shadow: 0 0 0 2px rgba(217, 180, 90, .35); }
input[type='time'] { min-width: 130px; width: auto; font-family: var(--titre); font-size: 22px; }
input[type='search']::-webkit-search-cancel-button { display: none; }

/* ---------- Porte d'entrée (code, prénom) ---------- */
.porte { min-height: 100dvh; display: grid; place-items: center; padding: 28px 22px calc(28px + var(--bas)); }
.porte-carte { width: min(100%, 440px); display: grid; gap: 22px; justify-items: center; text-align: center; }
.porte-carte .blason { width: 112px; }
.porte-carte form { width: 100%; display: grid; gap: 14px; }
.porte-carte input[type='text'] { text-align: center; font-size: 24px; letter-spacing: .08em; min-height: 62px; }
.porte-carte .choix { justify-content: center; }
.porte-carte .puce { min-height: 52px; font-size: 18px; padding: 10px 20px; }
.erreur { color: var(--ivoire); background: var(--airelle); padding: 10px 14px; border-radius: 3px; font-weight: 700; }
.secoue { animation: secoue .35s ease; }
@keyframes secoue { 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }

/* ---------- Charpente ---------- */
.colonne { display: none; }
#vue { max-width: 720px; margin: 0 auto; padding: calc(14px + env(safe-area-inset-top, 0px)) 16px calc(104px + var(--bas)); outline: none; }
#vue.entre > * { animation: entre .26s var(--vif) both; }
@keyframes entre { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.onglets {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 4px 4px calc(4px + var(--bas)); background: var(--sapin-nuit); border-top: 1px solid var(--filet);
}
.onglets::before { content: ''; position: absolute; left: 0; right: 0; top: 2px; border-top: 1px solid rgba(217, 180, 90, .3); pointer-events: none; }
.onglet { display: grid; justify-items: center; gap: 1px; min-height: 60px; padding: 8px 2px 5px; color: var(--ivoire-voile); font-size: 13px; font-weight: 700; text-decoration: none; position: relative; }
.onglet .picto { width: 28px; height: 28px; stroke: var(--ivoire-voile); transition: stroke .2s, transform .25s var(--rebond); }
.onglet[aria-current='page'] { color: var(--or); }
.onglet[aria-current='page'] .picto { stroke: var(--or); transform: translateY(-2px) scale(1.08); }
.onglet[aria-current='page']::after { content: ''; position: absolute; top: 1px; width: 7px; height: 7px; background: var(--or); transform: rotate(45deg); }

.vue-tete { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 6px 0 18px; }
.vue-tete .surtitre { margin-bottom: 6px; }
.vue-tete p.doux { margin-top: 8px; }
.moi { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 12px 6px 6px; border: 1px solid var(--filet); border-radius: 22px; background: var(--sapin-leve); font-weight: 700; font-size: 15px; flex: none; max-width: 46vw; }
.moi span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pastille { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--or); color: var(--sapin-nuit); font: 700 16px/1 var(--titre); flex: none; }

.bloc { margin-top: 30px; }
.bloc > h3 { margin-bottom: 12px; }

/* ---------- Accueil ---------- */
.guirlande { display: flex; flex-wrap: wrap; justify-content: center; gap: 0; margin: 0 -8px 6px; min-height: 62px; }
.ampoule { position: relative; width: 46px; height: 62px; display: grid; justify-items: center; align-content: end; padding-bottom: 2px; }
.ampoule::before { content: ''; position: absolute; top: -13px; left: -1px; right: -1px; height: 26px; border: 1.5px solid var(--or-sourd); border-top: 0; border-left-color: transparent; border-right-color: transparent; border-radius: 0 0 50% 50% / 0 0 100% 100%; }
.ampoule::after { content: ''; position: absolute; top: 12px; left: 50%; width: 9px; height: 8px; margin-left: -4.5px; background: var(--or-sourd); border-radius: 2px 2px 0 0; }
.ampoule i { position: relative; display: grid; place-items: center; width: 34px; height: 40px; border-radius: 50% 50% 50% 50% / 42% 42% 58% 58%; border: 1.5px solid var(--or-sourd); color: var(--ivoire-voile); font: normal 600 16px/1 var(--titre); background: var(--sapin); transition: background-color .4s, color .4s, box-shadow .4s, border-color .4s; }
.ampoule.allumee i { background: var(--or-vif); border-color: var(--or-vif); color: var(--sapin-nuit); box-shadow: 0 0 14px 3px rgba(240, 213, 138, .5), 0 0 34px 8px rgba(240, 213, 138, .18); }
.ampoule.moi-meme i { border-style: double; border-width: 3px; }
.guirlande-vide { padding-top: 22px; }

.entete { display: grid; justify-items: center; text-align: center; gap: 10px; margin-top: 6px; }
.blason-btn { width: 104px; padding: 4px; border-radius: 6px; transition: transform .2s var(--rebond); }
.blason-btn:active { transform: scale(.94) rotate(-2deg); }
.entete .lieu { color: var(--ivoire-voile); max-width: 30em; text-wrap: balance; }

.rebours { display: flex; justify-content: center; gap: 10px; margin-top: 26px; perspective: 700px; }
.case { position: relative; flex: 1 1 0; max-width: 150px; padding: 12px 4px 10px; text-align: center; background: var(--sapin-leve); border: 1px solid var(--or-sourd); border-radius: 3px; transform-origin: left center; }
.case::before { content: ''; position: absolute; inset: 4px; border: 1px solid rgba(217, 180, 90, .28); border-radius: 1px; pointer-events: none; }
.chiffre { display: block; font: 600 clamp(54px, 19vw, 96px)/.95 var(--titre); font-variation-settings: 'SOFT' 100, 'WONK' 1, 'opsz' 144; font-feature-settings: 'lnum'; color: var(--or); letter-spacing: -.03em; }
.unite { display: block; margin-top: 4px; font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ivoire-voile); }
.case.bascule { animation: bascule .44s var(--vif); }
@keyframes bascule { 0% { transform: rotateY(0); } 45% { transform: rotateY(-78deg); } 55% { transform: rotateY(-78deg); } 100% { transform: rotateY(0); } }
.rebours-mot { text-align: center; margin-top: 14px; }

.trois { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 26px; border-top: 1px solid var(--or-sourd); border-bottom: 1px solid var(--or-sourd); position: relative; }
.trois::before { content: ''; position: absolute; inset: 3px 0; border-top: 1px solid rgba(217, 180, 90, .3); border-bottom: 1px solid rgba(217, 180, 90, .3); pointer-events: none; }
.trois a { display: grid; justify-items: center; gap: 2px; padding: 16px 4px 14px; text-decoration: none; color: var(--ivoire); }
.trois li + li a { border-left: 1px solid var(--filet); }
.trois b { font: 600 40px/1 var(--titre); font-feature-settings: 'lnum'; color: var(--or); }
.trois li.alerte b { color: var(--ivoire); background: var(--airelle); padding: 0 12px 4px; border-radius: 3px; }
.trois span { font-size: 15px; color: var(--ivoire-voile); text-align: center; }
.appel { margin-top: 24px; display: grid; gap: 10px; }
.appel .aide { text-align: center; color: var(--ivoire-voile); font-size: 15px; }

.equilibre { padding: 18px 14px 16px; background: var(--sapin-leve); border: 1px solid var(--filet); border-radius: 3px; }
.jauge { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 2px 0 14px; }
.jauge li { display: grid; justify-items: center; gap: 4px; }
.jauge .picto { width: 30px; height: 30px; }
.jauge b { font: 600 20px/1 var(--titre); font-feature-settings: 'lnum'; }
.jauge .barre { width: 100%; max-width: 44px; height: 5px; background: var(--sapin-nuit); border-radius: 3px; overflow: hidden; }
.jauge .barre i { display: block; height: 100%; background: var(--ivoire-voile); border-radius: 3px; transition: width .4s var(--vif); }
.jauge .plein .barre i { background: var(--or); }
.jauge .zero .picto { stroke: var(--ivoire-voile); opacity: .7; }
.jauge.demarre .zero b { color: var(--ivoire); background: var(--airelle); border-radius: 3px; padding: 1px 7px 3px; }
.jauge .trop .barre i { background: var(--or-vif); }

.nouvelles li { display: flex; gap: 10px; align-items: baseline; padding: 9px 0; border-bottom: 1px dotted var(--filet); }
.nouvelles li span:first-child { flex: 1; }
.nouvelles time { color: var(--ivoire-voile); font-size: 14px; white-space: nowrap; }
.nouvelles b { color: var(--or); }

.mouvements { display: grid; gap: 12px; padding: 16px; border: 1px dashed var(--or-sourd); border-radius: 3px; }
.signature { margin-top: 44px; display: grid; justify-items: center; gap: 10px; text-align: center; color: var(--ivoire-voile); font-size: 15px; }
.signature .blason { width: 44px; opacity: .9; }

/* ---------- La carte (menu) ---------- */
.moment { margin-top: 34px; scroll-margin-top: 14px; }
.moment:first-of-type { margin-top: 8px; }
.moment-tete { display: grid; justify-items: center; gap: 4px; text-align: center; margin-bottom: 14px; }
.moment-tete .filets { width: 100%; }
.moment-tete .picto { width: 44px; height: 44px; }
.moment-tete .doux { font-size: 15px; }
.plats { display: grid; gap: 8px; margin-bottom: 10px; }
.plat { position: relative; display: grid; grid-template-columns: 48px 1fr; align-items: start; background: var(--sapin-leve); border: 1px solid var(--filet); border-radius: 3px; transition: border-color .3s, box-shadow .3s; }
.plat.confirme { border-color: var(--or); box-shadow: inset 0 0 0 1px rgba(217, 180, 90, .35); }
.rond { display: grid; place-items: center; width: 48px; height: 54px; }
.rond span { display: grid; place-items: center; width: 28px; height: 28px; border: 2px solid var(--ivoire-voile); border-radius: 50%; transition: border-color .2s, background-color .2s; }
.rond .picto { width: 22px; height: 22px; stroke-width: 2.6; opacity: 0; }
.plat.confirme .rond span { border-color: var(--or); background: rgba(217, 180, 90, .16); }
.plat.confirme .rond .picto { opacity: 1; }
.plat.libre .rond span { border-style: dashed; opacity: .5; }
.plat-corps { display: grid; gap: 2px; padding: 12px 12px 12px 0; text-align: left; width: 100%; min-height: 54px; align-content: center; }
.plat-ligne { display: flex; align-items: flex-end; gap: 8px; }
.plat.libre .plat-ligne { align-items: center; }
.plat.libre .points { margin-bottom: 0; }
.plat-titre { font-weight: 700; font-size: 18px; line-height: 1.25; overflow-wrap: anywhere; }
.points { flex: 1; min-width: 14px; border-bottom: 2px dotted var(--or-sourd); margin-bottom: 6px; }
.plat-note { color: var(--ivoire-voile); font-size: 16px; overflow-wrap: anywhere; }
.plat-etat { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ivoire-voile); }
.plat.confirme .plat-etat { color: var(--or); }
.etiquette {
  flex: none; max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 5px 11px 5px 21px; font: 700 15px/1.2 var(--texte); color: var(--sapin-nuit);
  background: radial-gradient(circle at 11px 50%, var(--sapin-leve) 2.4px, transparent 3px), var(--ivoire);
  clip-path: polygon(9px 0, 100% 0, 100% 100%, 9px 100%, 0 50%);
}
.plat.confirme .etiquette, .etiquette.or { background: radial-gradient(circle at 11px 50%, var(--sapin-leve) 2.4px, transparent 3px), var(--or); }
.prendre { flex: none; min-height: 40px; padding: 7px 13px; background: var(--airelle); color: var(--ivoire); font-weight: 700; font-size: 15px; border-radius: 3px; position: relative; z-index: 2; }
.prendre:hover { background: var(--airelle-nuit); }
.a-prendre { display: inline-block; padding: 2px 8px; background: var(--airelle); color: var(--ivoire); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; border-radius: 2px; }
.par { position: absolute; top: -11px; right: 10px; padding: 1px 9px; background: var(--or); color: var(--sapin-nuit); font-size: 13px; font-weight: 700; border-radius: 2px; animation: fondu .3s ease, fondu .4s ease 4.2s reverse forwards; }
.vide { padding: 14px 12px 16px; text-align: center; }

.plat.tombe { animation: tombe .46s var(--rebond) both; }
@keyframes tombe { 0% { opacity: 0; transform: translateY(-34px) rotate(-1.5deg) scale(.97); } 60% { opacity: 1; } 100% { transform: none; } }
.plat.halo { animation: halo 1.6s ease-out both; }
@keyframes halo { 0% { opacity: 0; box-shadow: 0 0 0 0 rgba(240, 213, 138, .9); } 18% { opacity: 1; box-shadow: 0 0 0 5px rgba(240, 213, 138, .55), 0 0 28px 8px rgba(240, 213, 138, .35); } 100% { box-shadow: 0 0 0 0 rgba(240, 213, 138, 0); } }
.plat.vient-confirmer .coche-trait { stroke-dasharray: 1; stroke-dashoffset: 1; animation: trace .38s var(--vif) .05s forwards; }
.plat.vient-confirmer { animation: lisere .45s ease-out; }
@keyframes lisere { 0% { box-shadow: 0 0 0 0 rgba(217, 180, 90, .8); } 100% { box-shadow: 0 0 0 9px rgba(217, 180, 90, 0), inset 0 0 0 1px rgba(217, 180, 90, .35); } }
.etiquette.nouee { animation: nouee .46s var(--rebond) both; transform-origin: left center; }
@keyframes nouee {
  0% { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 0 50%); background-color: var(--airelle); color: var(--ivoire); transform: scale(1.12); }
  55% { transform: rotate(-7deg) scale(1.06); }
  100% { clip-path: polygon(9px 0, 100% 0, 100% 100%, 9px 100%, 0 50%); transform: none; }
}

/* ---------- Idées ---------- */
.recherche { position: relative; }
.recherche .picto { position: absolute; left: 14px; top: 50%; margin-top: -12px; width: 24px; height: 24px; stroke: var(--ivoire-voile); pointer-events: none; }
.recherche input { padding-left: 48px; }
.filtres { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; margin: 12px 0 6px; }
.compte { margin: 10px 0 8px; color: var(--ivoire-voile); font-size: 15px; }
.idees { display: grid; gap: 8px; }
.idee { display: grid; grid-template-columns: 1fr 56px; background: var(--sapin-leve); border: 1px solid var(--filet); border-radius: 3px; content-visibility: auto; contain-intrinsic-size: auto 86px; }
.idee-corps { display: grid; grid-template-columns: 34px 1fr; gap: 2px 10px; padding: 12px 6px 12px 12px; text-align: left; align-items: start; }
.idee-corps .picto { grid-row: span 3; margin-top: 2px; }
.idee-titre { font-weight: 700; font-size: 18px; line-height: 1.25; }
.idee-mot { color: var(--ivoire-voile); font-size: 16px; line-height: 1.35; }
.idee-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 2px 7px; border: 1px solid var(--filet); border-radius: 2px; color: var(--ivoire-voile); }
.tag.or { border-color: var(--or-sourd); color: var(--or); }
.tag.pris { border-color: var(--or); background: var(--or); color: var(--sapin-nuit); }
.idee-plus { display: grid; place-items: center; border-left: 1px dotted var(--filet); color: var(--or); }
.idee-plus .picto { width: 28px; height: 28px; transition: transform .25s var(--rebond); }
.idee-plus:active .picto { transform: scale(1.3) rotate(90deg); }
.idee-plus:hover { background: rgba(217, 180, 90, .08); }

/* ---------- Tablée ---------- */
.cuisine { padding: 16px; background: var(--sapin-leve); border: 1px solid var(--filet); border-radius: 3px; display: grid; gap: 8px; }
.cuisine li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.convives { display: grid; gap: 12px; }
.convive { padding: 14px 14px 12px; background: var(--sapin-leve); border: 1px solid var(--filet); border-radius: 3px; display: grid; gap: 10px; }
.convive-tete { display: flex; gap: 12px; align-items: center; }
.convive-tete .ampoule { width: 40px; height: 44px; padding: 0; flex: none; }
.convive-tete .ampoule::before, .convive-tete .ampoule::after { display: none; }
.convive-nom { font: italic 500 24px/1.1 var(--titre); font-variation-settings: 'SOFT' 100, 'WONK' 1; }
.convive-tete > div { flex: 1; min-width: 0; display: grid; gap: 5px; }
.badges { display: flex; flex-wrap: wrap; gap: 5px; }
.badge { font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sapin-nuit); background: var(--or); padding: 2px 8px; clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 50%, calc(100% - 6px) 100%, 6px 100%, 0 50%); padding-inline: 12px; }
.convive-plats li { display: flex; gap: 8px; align-items: baseline; padding: 7px 0; border-top: 1px dotted var(--filet); }
.convive-plats li span:first-child { flex: 1; }
.convive-plats .etat { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ivoire-voile); white-space: nowrap; }
.convive-plats .etat.ok { color: var(--or); }
.convive-notes { display: grid; gap: 6px; }
.note { display: flex; gap: 8px; align-items: baseline; text-align: left; width: 100%; padding: 6px 0; min-height: 40px; }
.note .tag { flex: none; }
.note.allergie .tag { background: var(--airelle); border-color: var(--airelle); color: var(--ivoire); }
.convive-actions { display: flex; flex-wrap: wrap; gap: 4px 18px; border-top: 1px solid var(--filet); padding-top: 4px; }

/* ---------- Déroulé ---------- */
.deroule { position: relative; display: grid; gap: 4px; margin-bottom: 14px; }
.deroule::before { content: ''; position: absolute; left: 99px; top: 18px; bottom: 18px; border-left: 2px dotted var(--or-sourd); }
.creneau { display: grid; grid-template-columns: 88px 24px 1fr 30px; align-items: center; gap: 0; width: 100%; min-height: 62px; padding: 6px 8px 6px 0; text-align: left; border-radius: 3px; }
.creneau:hover { background: rgba(217, 180, 90, .06); }
.creneau .heure { font: 600 24px/1 var(--titre); font-feature-settings: 'lnum'; color: var(--or); text-align: right; padding-right: 8px; }
.creneau .noeud { width: 13px; height: 13px; margin: 0 auto; background: var(--sapin); border: 2px solid var(--or); transform: rotate(45deg); position: relative; z-index: 1; }
.creneau .quoi { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; padding-left: 8px; }
.creneau .quoi .picto { width: 28px; height: 28px; }
.creneau .crayon { width: 20px; height: 20px; stroke: var(--ivoire-voile); opacity: .7; }
.creneau.en-cours .noeud { background: var(--or); box-shadow: 0 0 0 5px rgba(217, 180, 90, .25); }
.creneau.en-cours .quoi { color: var(--or); }

/* ---------- La carte du soir (jour J) ---------- */
.carte-soir { margin: 4px 0 0; padding: 30px 18px 34px; background: var(--ivoire); color: var(--sapin-nuit); text-align: center; border-radius: 2px; position: relative; }
.carte-soir::before { content: ''; position: absolute; inset: 7px; border: 1px solid var(--or-sourd); box-shadow: inset 0 0 0 3px var(--ivoire), inset 0 0 0 4px var(--or-sourd); pointer-events: none; }
.carte-soir .blason { width: 70px; margin: 0 auto 10px; stroke: #7A6220; }
.carte-soir .surtitre { color: #6B5518; }
.carte-soir h1 { color: var(--sapin-nuit); margin-top: 6px; }
.carte-soir h1 em { color: var(--airelle); }
.cs-moment { margin-top: 26px; padding: 4px 10px; position: relative; }
.cs-moment .picto { stroke: #7A6220; width: 34px; height: 34px; margin: 0 auto; display: block; }
.cs-moment h2 { color: var(--sapin-nuit); }
.cs-heure { font: 600 17px/1 var(--titre); font-feature-settings: 'lnum'; letter-spacing: .08em; color: #6B5518; margin: 4px 0; }
.cs-heure:empty { display: none; }
.cs-moment li { font-size: 18px; margin-top: 8px; line-height: 1.3; }
.cs-moment li span { display: block; font: italic 400 16px/1.3 var(--titre); color: #4D5B4F; }
.cs-moment .cs-vide { font: italic 400 17px/1.3 var(--titre); color: #4D5B4F; margin-top: 8px; }
.cs-moment.en-cours { background: var(--sapin); color: var(--ivoire); padding: 18px 12px 20px; margin-inline: -4px; box-shadow: 0 0 0 1px var(--or), 0 0 0 4px var(--sapin), 0 0 0 5px var(--or); }
.cs-moment.en-cours h2 { color: var(--or); }
.cs-moment.en-cours .picto { stroke: var(--or); }
.cs-moment.en-cours .cs-heure, .cs-moment.en-cours li span { color: var(--ivoire-voile); }
.cs-maintenant { display: inline-block; margin-bottom: 8px; padding: 2px 10px; background: var(--airelle); color: var(--ivoire); font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; border-radius: 2px; }
.cs-simple { margin-top: 22px; font: italic 500 20px/1.2 var(--titre); }
.cs-simple b { font: 600 17px/1 var(--titre); font-feature-settings: 'lnum'; letter-spacing: .08em; color: #6B5518; display: block; margin-bottom: 3px; font-style: normal; }
.cs-sep { margin: 24px auto 0; width: 80px; height: 4px; border-top: 1px solid #A8925A; border-bottom: 1px solid #A8925A; }

/* ---------- Feuilles (dialogues) ---------- */
dialog.feuille {
  width: 100%; max-width: 100%; max-height: 92dvh; margin: auto 0 0; padding: 0; border: 0; color: var(--ivoire);
  background: var(--sapin); border-top: 1px solid var(--or); overflow: hidden;
  box-shadow: 0 -3px 0 var(--sapin), 0 -4px 0 var(--or-sourd), 0 -30px 60px rgba(0, 0, 0, .5);
}
dialog.feuille[open] { display: flex; flex-direction: column; animation: monte .3s var(--vif); }
dialog.feuille::backdrop { background: rgba(4, 16, 12, .72); animation: fondu .25s ease; }
@keyframes monte { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.feuille-corps { grid-template-columns: minmax(0, 1fr); overflow-y: auto; overscroll-behavior: contain; padding: 20px 18px calc(22px + var(--bas)); display: grid; gap: 18px; -webkit-overflow-scrolling: touch; }
.feuille-tete { display: flex; align-items: center; gap: 12px; padding-right: 44px; }
.feuille-tete .picto { width: 40px; height: 40px; }
.feuille-fermer { position: absolute; top: 8px; right: 8px; width: 48px; height: 48px; display: grid; place-items: center; z-index: 2; }
.feuille-fermer .picto { width: 24px; height: 24px; stroke: var(--ivoire-voile); }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.duo.un { grid-template-columns: 1fr; }
.pile { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.entre-deux { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Fiche recette */
.fiche-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--ivoire-voile); font-size: 16px; }
.fiche-meta b { color: var(--ivoire); }
.diff { letter-spacing: 3px; color: var(--or); }
.couverts { display: flex; align-items: center; gap: 12px; }
.couverts button { width: 48px; height: 48px; border: 1px solid var(--or-sourd); border-radius: 50%; color: var(--or); font: 600 26px/1 var(--titre); display: grid; place-items: center; }
.couverts button:active { background: rgba(217, 180, 90, .15); }
.couverts output { font: 600 30px/1 var(--titre); font-feature-settings: 'lnum'; color: var(--or); min-width: 1.4em; text-align: center; }
.ingredients li { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px dotted var(--filet); }
.ingredients b { flex: none; min-width: 5.2em; color: var(--or); font-weight: 700; }
.etapes { counter-reset: e; display: grid; gap: 14px; }
.etapes li { counter-increment: e; display: grid; grid-template-columns: 34px 1fr; gap: 8px; }
.etapes li::before { content: counter(e); font: italic 600 26px/1 var(--titre); color: var(--or); }
.veille { padding: 12px 14px; border-left: 3px double var(--or); background: var(--sapin-leve); }
.veille b { color: var(--or); }

/* Roulette */
.rouleaux { display: grid; gap: 10px; }
.rang { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: stretch; }
.rang .btn { min-height: 0; padding-inline: 14px; }
.rang .rouleau { text-align: left; width: 100%; }
.rouleau { position: relative; height: 94px; box-sizing: border-box; overflow: hidden; background: var(--sapin-nuit); border: 1px solid var(--or-sourd); border-radius: 3px; }
.rouleau::before, .rouleau::after { content: ''; position: absolute; left: 0; right: 0; height: 16px; z-index: 2; pointer-events: none; }
.rouleau::before { top: 0; background: linear-gradient(var(--sapin-nuit), transparent); }
.rouleau::after { bottom: 0; background: linear-gradient(transparent, var(--sapin-nuit)); }
.bande { will-change: transform; }
.bande > div { height: 92px; overflow: hidden; display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 4px 12px; padding: 10px 14px; align-content: center; }
.bande .picto { width: 38px; height: 38px; grid-row: span 2; }
.bande b { font-size: 18px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bande span { color: var(--ivoire-voile); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }
.rouleau.tourne .bande { filter: blur(1.2px); }
.rouleau.pose { animation: pose .3s var(--rebond); border-color: var(--or); }
@keyframes pose { 0% { transform: translateY(-5px); } 100% { transform: none; } }
.resultats { display: grid; gap: 8px; }
.resultat { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ---------- Bulles ---------- */
#toasts { position: fixed; left: 12px; right: 12px; bottom: calc(82px + var(--bas)); z-index: 70; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; max-width: 520px; padding: 12px 16px; background: var(--ivoire); color: var(--sapin-nuit); font-weight: 700; border-radius: 3px; box-shadow: 0 8px 28px rgba(0, 0, 0, .45); animation: toast .32s var(--rebond); }
.toast button { color: var(--airelle); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; min-height: 40px; padding: 0 4px; flex: none; }
.toast.sort { opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s; }
@keyframes toast { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
.hors-ligne { position: sticky; top: 0; z-index: 15; margin: 0 -16px 10px; padding: 8px 16px; background: var(--airelle); color: var(--ivoire); font-weight: 700; font-size: 15px; text-align: center; }

/* ---------- Ordinateur ---------- */
@media (min-width: 900px) {
  #app.salle { display: grid; grid-template-columns: 272px 1fr; min-height: 100dvh; }
  .colonne { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100dvh; padding: 30px 20px 22px; background: rgba(7, 28, 21, .82); border-right: 1px solid var(--filet); box-shadow: inset -4px 0 0 -3px rgba(217, 180, 90, .3); }
  .colonne .blason { width: 84px; margin: 0 auto 10px; }
  .colonne-titre { text-align: center; font: italic 500 23px/1.15 var(--titre); font-variation-settings: 'SOFT' 100, 'WONK' 1; margin-bottom: 4px; }
  .colonne-titre em { color: var(--or); }
  .colonne-date { text-align: center; color: var(--ivoire-voile); font-size: 15px; margin-bottom: 20px; }
  .colonne nav { display: grid; gap: 2px; }
  .colonne .onglet { grid-auto-flow: column; justify-content: start; justify-items: start; align-items: center; gap: 14px; min-height: 54px; padding: 8px 14px; font-size: 18px; border-radius: 3px; }
  .colonne .onglet:hover { background: rgba(217, 180, 90, .07); color: var(--ivoire); }
  .colonne .onglet[aria-current='page'] { background: rgba(217, 180, 90, .1); }
  .colonne .onglet[aria-current='page'] .picto { transform: none; }
  .colonne .onglet[aria-current='page']::after { top: 50%; left: -3px; margin-top: -4px; }
  .colonne-pied { margin-top: auto; display: grid; gap: 10px; }
  .colonne-pied .moi { max-width: none; justify-self: start; }
  .onglets { display: none; }
  #vue { width: 100%; max-width: 820px; padding: 36px 40px 80px; }
  .vue-tete .moi { display: none; }
  #toasts { bottom: 26px; left: 272px; }
  dialog.feuille { width: 600px; max-height: 88dvh; margin: auto; border: 1px solid var(--or); box-shadow: 0 0 0 3px var(--sapin), 0 0 0 4px var(--or-sourd), 0 30px 80px rgba(0, 0, 0, .6); }
  .feuille-corps { padding: 28px 30px 30px; }
  .accueil-bas { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; align-items: start; }
  .rebours { gap: 16px; }
  .chiffre { font-size: 104px; }
  .plat-corps { padding-right: 16px; }
  .idees { grid-template-columns: 1fr 1fr; }
  .convives { grid-template-columns: 1fr 1fr; align-items: start; }
  .carte-soir { padding: 48px 60px 54px; }
  .rouleaux { grid-template-columns: repeat(3, 1fr); }
  .rang { grid-template-columns: 1fr; }
  .rang .btn { min-height: 52px; }
  .rouleau { height: 152px; }
  .bande > div { height: 150px; }
  .bande > div { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .bande .picto { grid-row: auto; }
}

/* ---------- Moins de mouvement ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .blason.trace .t { stroke-dashoffset: 0; }
  #neige, #confettis { display: none; }
}
