/* Cadeaux — direction « papeterie » : papier crème, ruban rouge, étiquettes,
   timbres-poste et enveloppe « par avion ». Polices auto-hébergées. */

@font-face { font-family: 'Instrument Serif'; src: url(/fonts/instrument.woff2) format('woff2'); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url(/fonts/instrument-italic.woff2) format('woff2'); font-style: italic; font-weight: 400; font-display: swap; }
@font-face { font-family: 'Bricolage Grotesque'; src: url(/fonts/bricolage.woff2) format('woff2'); font-style: normal; font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; }

:root {
  --paper: #f4ece0;
  --paper-2: #ebe0d0;
  --card: #fffcf7;
  --plate: #ffffff;
  --ink: #2a1e18;
  --ink-2: #5d4b41;
  --ink-3: #74635a;
  --line: #e0d2bf;
  --line-2: #cdbba5;
  --ribbon: #c8372d;
  --ribbon-2: #a92b22;
  --on-ribbon: #fff8f0;
  --heart: #e0443a;
  --kraft: #b88a5c;
  --ok: #2f6b4f;
  --airmail-b: #2c4a7a;
  --shadow-sm: 0 1px 0 rgba(80, 50, 20, .05), 0 2px 6px -2px rgba(80, 50, 20, .12);
  --shadow: 0 1px 0 rgba(80, 50, 20, .05), 0 10px 28px -14px rgba(80, 50, 20, .32);
  --shadow-lg: 0 30px 60px -20px rgba(60, 35, 15, .45);
  --r: 18px;
  --f-display: 'Instrument Serif', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --f-ui: 'Bricolage Grotesque', 'Avenir Next', 'Segoe UI', sans-serif;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .22 0 0 0 0 .1 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1b1512; --paper-2: #241c18; --card: #2a211c; --plate: #f6f1ea;
    --ink: #f3e8da; --ink-2: #cfbdab; --ink-3: #9b8878; --line: #3b2f28; --line-2: #52423a;
    --ribbon: #e2574b; --ribbon-2: #f06c60; --on-ribbon: #1b1512; --heart: #ff6a5f; --kraft: #c99d6d; --ok: #6cc29a; --airmail-b: #7f9fd6;
    --shadow-sm: 0 1px 0 rgba(0, 0, 0, .3), 0 2px 6px -2px rgba(0, 0, 0, .5);
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 14px 30px -16px rgba(0, 0, 0, .8);
    --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .85);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1b1512; --paper-2: #241c18; --card: #2a211c; --plate: #f6f1ea;
  --ink: #f3e8da; --ink-2: #cfbdab; --ink-3: #9b8878; --line: #3b2f28; --line-2: #52423a;
  --ribbon: #e2574b; --ribbon-2: #f06c60; --on-ribbon: #1b1512; --heart: #ff6a5f; --kraft: #c99d6d; --ok: #6cc29a; --airmail-b: #7f9fd6;
  --shadow-sm: 0 1px 0 rgba(0, 0, 0, .3), 0 2px 6px -2px rgba(0, 0, 0, .5);
  --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 14px 30px -16px rgba(0, 0, 0, .8);
  --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .85);
  color-scheme: dark;
}

.tone-rouge { --tone: #c8372d; --tone-soft: #f6dcd6; }
.tone-sapin { --tone: #2f6b4f; --tone-soft: #d7e8de; }
.tone-nuit  { --tone: #2c4a7a; --tone-soft: #d9e1ef; }
.tone-prune { --tone: #7a3b69; --tone-soft: #ecd9e6; }
.tone-ocre  { --tone: #b97a17; --tone-soft: #f3e3c6; }
.tone-lagon { --tone: #1f7a80; --tone-soft: #d3eaeb; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tone-rouge { --tone: #e2574b; --tone-soft: #3d2320; }
  :root:not([data-theme="light"]) .tone-sapin { --tone: #5fb48a; --tone-soft: #1e2f26; }
  :root:not([data-theme="light"]) .tone-nuit  { --tone: #7f9fd6; --tone-soft: #1f2738; }
  :root:not([data-theme="light"]) .tone-prune { --tone: #c97db5; --tone-soft: #33212e; }
  :root:not([data-theme="light"]) .tone-ocre  { --tone: #e0a548; --tone-soft: #352b1b; }
  :root:not([data-theme="light"]) .tone-lagon { --tone: #4fb8bf; --tone-soft: #1a3133; }
}
:root[data-theme="dark"] .tone-rouge { --tone: #e2574b; --tone-soft: #3d2320; }
:root[data-theme="dark"] .tone-sapin { --tone: #5fb48a; --tone-soft: #1e2f26; }
:root[data-theme="dark"] .tone-nuit  { --tone: #7f9fd6; --tone-soft: #1f2738; }
:root[data-theme="dark"] .tone-prune { --tone: #c97db5; --tone-soft: #33212e; }
:root[data-theme="dark"] .tone-ocre  { --tone: #e0a548; --tone-soft: #352b1b; }
:root[data-theme="dark"] .tone-lagon { --tone: #4fb8bf; --tone-soft: #1a3133; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background-color: var(--paper);
  background-image: var(--grain);
  color: var(--ink);
  font: 400 16px/1.5 var(--f-ui);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-dragging { cursor: grabbing; user-select: none; -webkit-user-select: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2.5px solid var(--ribbon); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 99px; z-index: 100; }
.skip:focus { left: 12px; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.center { text-align: center; }
.hide-xs { display: none; }
@media (min-width: 520px) { .hide-xs { display: inline; } }
[hidden] { display: none !important; }

/* --- typo -------------------------------------------------------------------- */
.display { font-family: var(--f-display); font-weight: 400; letter-spacing: -.01em; line-height: 1.02; margin: 0; text-wrap: balance; }
.display em { font-style: italic; color: var(--ribbon); }
.display.xl { font-size: clamp(2.7rem, 8.5vw, 5.6rem); }
.display.lg { font-size: clamp(2.2rem, 6vw, 3.6rem); }
.display.md { font-size: clamp(1.55rem, 3.6vw, 2.1rem); line-height: 1.08; }
.eyebrow { margin: 0 0 10px; font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.lede { font-size: clamp(1.02rem, 2.2vw, 1.18rem); color: var(--ink-2); max-width: 36em; margin: 18px 0 26px; text-wrap: pretty; }

/* --- boutons ---------------------------------------------------------------- */
.btn {
  --b: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px;
  border: 1.5px solid var(--b); background: transparent; color: var(--ink);
  font-weight: 600; font-size: .95rem; text-decoration: none; white-space: nowrap;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease, color .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn.primary { background: var(--ribbon); border-color: var(--ribbon); color: var(--on-ribbon); }
.btn.primary:hover { background: var(--ribbon-2); border-color: var(--ribbon-2); }
.btn.ghost { border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.danger { background: transparent; border-color: var(--ribbon); color: var(--ribbon); }
.btn.danger:hover { background: var(--ribbon); color: var(--on-ribbon); }
.btn.danger-txt { color: var(--ribbon); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: .86rem; gap: 6px; }
.btn.google { background: #fff; color: #1f1f1f; border-color: #dadce0; font-weight: 600; padding: 0 22px 0 14px; min-height: 50px; font-size: 1rem; }
.btn.google:hover { border-color: #b9bcc1; }
.btn.google .g { display: inline-flex; width: 22px; height: 22px; }
.btn.google .g svg { width: 100%; height: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: transparent; color: var(--ink-2); text-decoration: none; flex: none;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--paper-2); color: var(--ink); }
.icon-btn.small { width: 34px; height: 34px; }
.linkish { background: none; border: 0; padding: 4px 2px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; font-size: .9rem; }
.linkish:hover { color: var(--ribbon); }
.ico { display: inline-flex; width: 1.2em; height: 1.2em; flex: none; }
.ico svg { width: 100%; height: 100%; }
.icon-btn .ico { width: 20px; height: 20px; }

/* --- barre du haut ---------------------------------------------------------- */
.top {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  -webkit-backdrop-filter: blur(12px) saturate(1.4); backdrop-filter: blur(12px) saturate(1.4);
  border-bottom: 1px dashed var(--line-2);
  padding-top: env(safe-area-inset-top);
}
.top-inner { max-width: 1180px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); }
.brand-mark { display: inline-flex; width: 30px; height: 30px; color: var(--ribbon); transform: rotate(-8deg); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.brand:hover .brand-mark { transform: rotate(6deg); }
.brand-mark svg { width: 100%; height: 100%; }
.brand-word { font-family: var(--f-display); font-style: italic; font-size: 1.75rem; line-height: 1; letter-spacing: -.01em; }
.top-right { display: flex; align-items: center; gap: 8px; }
.avatar-btn { border: 0; padding: 3px; background: none; border-radius: 50%; }
.avatar-btn:hover .avatar { box-shadow: 0 0 0 3px var(--paper-2); }
.avatar {
  position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--ribbon); color: var(--on-ribbon); font-weight: 700; overflow: hidden; flex: none;
  box-shadow: 0 0 0 2px var(--card);
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 28px; height: 28px; font-size: .8rem; }
.avatar.lg { width: 72px; height: 72px; font-size: 1.8rem; }

/* --- menus ------------------------------------------------------------------ */
.menu {
  position: absolute; z-index: 80; min-width: 220px; padding: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg);
  animation: pop .16s cubic-bezier(.2, .9, .3, 1.2);
}
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: none; border-radius: 9px; text-align: left; font-size: .93rem; }
.menu-item:hover, .menu-item:focus-visible { background: var(--paper-2); outline: none; }
.menu-item .ico { color: var(--ink-3); }
.menu-item.danger { color: var(--ribbon); }
.menu-item.danger .ico { color: var(--ribbon); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.97); } }

/* --- mise en page ----------------------------------------------------------- */
main { max-width: 1180px; margin: 0 auto; padding: 0 16px 40px; outline: none; }
@media (min-width: 760px) { main { padding: 0 28px 56px; } .top-inner { padding: 10px 28px; } }
.foot { text-align: center; color: var(--ink-3); font-size: .82rem; padding: 40px 0 calc(10px + env(safe-area-inset-bottom)); }
.foot-links { display: flex; justify-content: center; gap: 16px; margin-top: 8px; }
.foot-links a { color: var(--ink-3); text-underline-offset: 3px; }
.foot-links a:hover { color: var(--ribbon); }
.consent { margin: 14px 0 0; }
.consent a { color: inherit; text-underline-offset: 3px; }
.legal { max-width: 760px; margin: 0 auto; padding-bottom: 10px; }
.legal .eyebrow { margin-top: 26px; }
.legal section { margin-top: 30px; }
.legal h2 { margin-bottom: 10px; }
.legal p, .legal li { color: var(--ink-2); line-height: 1.65; }
.legal ul { padding-left: 20px; display: grid; gap: 8px; }
.legal a { color: var(--ribbon); text-underline-offset: 3px; }
.foot::before { content: ''; display: block; width: 60px; margin: 0 auto 14px; border-top: 1px dashed var(--line-2); }
.hint { display: flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: .85rem; margin: 12px 0 0; }
.hint .ico { width: 14px; height: 14px; }
.notice { padding: 10px 14px; border-radius: 12px; background: var(--paper-2); }
.notice.err { background: color-mix(in srgb, var(--ribbon) 14%, var(--card)); color: var(--ink); }

/* --- chargement ------------------------------------------------------------- */
.boot { display: grid; place-items: center; min-height: 50vh; }
.boot-tag { width: 40px; height: 52px; border-radius: 6px 6px 8px 8px; background: var(--ribbon); position: relative; transform-origin: 50% -20px; animation: swing 1.1s ease-in-out infinite alternate; }
.boot-tag::before { content: ''; position: absolute; top: 9px; left: 50%; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: var(--paper); }
.boot-tag::after { content: ''; position: absolute; bottom: 100%; left: 50%; width: 1.5px; height: 22px; background: var(--kraft); }
@keyframes swing { from { transform: rotate(-12deg); } to { transform: rotate(12deg); } }
.skeleton { background: linear-gradient(100deg, var(--paper-2) 30%, color-mix(in srgb, var(--paper-2) 50%, var(--card)) 50%, var(--paper-2) 70%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; border-radius: var(--r); }
.lcard.skeleton { min-height: 280px; box-shadow: none; }
.gcard.skeleton { min-height: 300px; box-shadow: none; }
.skel-title { height: 46px; width: min(340px, 70%); margin: 32px 0 26px; border-radius: 12px; background: var(--paper-2); }
@keyframes shimmer { to { background-position: -300% 0; } }

/* --- timbre-poste ----------------------------------------------------------- */
.stamp {
  flex: none; display: inline-grid; place-items: center; width: 58px; height: 66px; padding: 5px;
  background: radial-gradient(circle at 50% 50%, transparent 2.6px, var(--card) 3px) -5px -5px / 10px 10px;
  filter: drop-shadow(0 2px 3px rgba(60, 35, 15, .25));
  transform: rotate(4deg);
}
.stamp > span {
  display: grid; place-items: center; width: 100%; height: 100%;
  background: var(--tone-soft, #f6dcd6); border: 1.5px solid var(--tone, var(--ribbon));
  font-size: 1.7rem; line-height: 1;
}
.stamp.big { width: 84px; height: 96px; padding: 6px; background-size: 12px 12px; background-position: -6px -6px; background-image: radial-gradient(circle at 50% 50%, transparent 3.2px, var(--card) 3.7px); }
.stamp.big > span { font-size: 2.6rem; }
@media (max-width: 520px) {
  .lhead .stamp.big { width: 62px; height: 72px; padding: 5px; background-size: 10px 10px; background-position: -5px -5px; }
  .lhead .stamp.big > span { font-size: 1.9rem; }
  .envelope .stamp.big { width: 66px; height: 76px; }
  .envelope .stamp.big > span { font-size: 2rem; }
}

/* --- accueil ---------------------------------------------------------------- */
.landing { display: grid; gap: 40px; padding: 40px 0 30px; align-items: center; }
@media (min-width: 900px) { .landing { grid-template-columns: 1.15fr .85fr; padding: 72px 0 40px; gap: 56px; } }
.landing-copy > * { animation: rise .7s cubic-bezier(.2, .8, .2, 1) both; }
.landing-copy > :nth-child(2) { animation-delay: .06s; }
.landing-copy > :nth-child(3) { animation-delay: .14s; }
.landing-copy > :nth-child(4), .landing-copy > :nth-child(5) { animation-delay: .22s; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.cta-row .muted { max-width: 22em; }
.cta-row.center { justify-content: center; }
.landing-art { position: relative; height: 380px; max-width: 420px; width: 100%; margin: 0 auto; }
.demo-tag {
  position: absolute; width: 210px; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow);
  transform: rotate(var(--r, 0deg)); animation: drop .9s cubic-bezier(.2, .9, .25, 1.15) both;
}
.demo-tag[data-i="0"] { left: 0; top: 30px; animation-delay: .15s; }
.demo-tag[data-i="1"] { right: 0; top: 0; animation-delay: .3s; z-index: 1; }
.demo-tag[data-i="2"] { left: 22%; top: 170px; animation-delay: .45s; z-index: 2; }
.demo-tag.fav { outline: 2px solid color-mix(in srgb, var(--heart) 50%, transparent); outline-offset: -2px; }
.demo-img { position: relative; height: 140px; margin: 8px 8px 0; border-radius: 12px; background: var(--plate); display: grid; place-items: center; }
.demo-emoji { font-size: 4.2rem; filter: saturate(.95); }
.demo-body { padding: 10px 14px 14px; display: grid; gap: 2px; }
.demo-body strong { font-weight: 600; font-size: .95rem; }
.demo-body span { font-size: .78rem; color: var(--ink-3); }
.demo-tag.taken .demo-img { filter: grayscale(.85); opacity: .7; }
.demo-stamp, .stamp-taken {
  position: absolute; top: 44px; left: 50%; transform: translateX(-50%) rotate(-12deg);
  padding: 4px 12px; border: 2.5px solid var(--ribbon); border-radius: 6px; color: var(--ribbon);
  font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: .78rem; background: color-mix(in srgb, var(--plate) 70%, transparent);
  mix-blend-mode: multiply;
}
@keyframes drop { from { opacity: 0; transform: translateY(-40px) rotate(calc(var(--r, 0deg) * -2)); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.steps { display: grid; gap: 14px; margin: 20px 0 10px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.step { padding: 22px 22px 24px; border-radius: var(--r); border: 1px dashed var(--line-2); background: color-mix(in srgb, var(--card) 60%, transparent); }
.step h3 { margin: 6px 0 6px; font-family: var(--f-display); font-weight: 400; font-size: 1.6rem; }
.step p { margin: 0; color: var(--ink-2); }
.step-n { font-size: .75rem; font-weight: 700; letter-spacing: .14em; color: var(--ribbon); text-transform: uppercase; }

/* --- tableau de bord -------------------------------------------------------- */
.dash-head { padding: 34px 0 22px; }
.lists-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.lcard {
  position: relative; display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
  background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden;
  transition: transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s;
  animation: rise .5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 45ms);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.lcard:hover { transform: translateY(-3px) rotate(-.4deg); box-shadow: var(--shadow-lg); }
.lcard-mosaic { display: grid; gap: 3px; aspect-ratio: 16 / 10; background: var(--line); }
.lcard-mosaic.n2, .lcard-mosaic.n3, .lcard-mosaic.n4 { grid-template-columns: 1fr 1fr; }
.lcard-mosaic.n3 .mos:first-child { grid-row: span 2; }
.lcard-mosaic.n4 { grid-template-rows: 1fr 1fr; }
.mos { background: var(--plate); display: grid; place-items: center; overflow: hidden; min-height: 0; }
.mos img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.mos.empty { background: var(--tone-soft); background-image: repeating-linear-gradient(-45deg, transparent 0 14px, color-mix(in srgb, var(--tone) 8%, transparent) 14px 15px); }
.big-emoji { font-size: 3.4rem; }
.mos .ph-art { color: var(--ink-3); }
.lcard-body { position: relative; padding: 16px 18px 18px; padding-right: 80px; border-top: 3px solid var(--tone); }
.lcard-body .stamp { position: absolute; right: 14px; top: -40px; }
.lcard-title { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: 1.65rem; line-height: 1.05; }
.lcard-link { color: inherit; text-decoration: none; outline: none; }
.lcard-link::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.lcard:has(.lcard-link:focus-visible) { outline: 2.5px solid var(--ribbon); outline-offset: 3px; }
.lcard { cursor: pointer; }
.lcard-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 6px 0 0; color: var(--ink-3); font-size: .85rem; }
.lcard-meta .fav-count { display: inline-flex; align-items: center; gap: 3px; color: var(--heart); }
.lcard-meta .fav-count .ico { width: 13px; height: 13px; fill: currentColor; }
.lcard-meta .fav-count svg path { fill: currentColor; }
.lcard .grip { position: absolute; top: 10px; left: 10px; z-index: 2; }
.lcard.new {
  align-items: center; justify-content: center; gap: 12px; min-height: 230px; box-shadow: none; border: 2px dashed var(--line-2);
  background: transparent; color: var(--ink-2); font-weight: 600; font-size: 1.02rem;
}
.lcard.new:hover { border-color: var(--ribbon); color: var(--ribbon); transform: none; box-shadow: none; }
.new-plus { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--paper-2); }
.lcard.new:hover .new-plus { background: var(--ribbon); color: var(--on-ribbon); }
.new-plus .ico { width: 26px; height: 26px; }

.grip {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 0;
  background: color-mix(in srgb, var(--card) 85%, transparent); color: var(--ink-3);
  cursor: grab; touch-action: none; -webkit-tap-highlight-color: transparent; box-shadow: var(--shadow-sm);
}
.grip:hover { color: var(--ink); }
.grip:active { cursor: grabbing; }
.grip .ico { width: 18px; height: 18px; }
.dragging { position: fixed !important; z-index: 90; margin: 0 !important; pointer-events: none; box-shadow: var(--shadow-lg) !important; animation: none !important; transition: none; opacity: .96; }
.drag-ph { border-radius: var(--r); border: 2px dashed var(--line-2); background: color-mix(in srgb, var(--paper-2) 70%, transparent); }
.gcard.settled, .lcard.settled { animation: none; }
.gcard.nudge, .lcard.nudge { animation: nudge .3s ease; }
@keyframes nudge { 50% { transform: scale(1.03); } }

.magic {
  display: grid; grid-template-columns: auto 1fr; gap: 12px 14px; align-items: center; margin: 28px 0 0; padding: 16px 18px;
  border-radius: var(--r); background: var(--ink); color: var(--paper); position: relative;
}
.magic .icon-btn { position: absolute; top: 6px; right: 6px; color: color-mix(in srgb, var(--paper) 70%, transparent); }
.magic .icon-btn:hover { background: rgba(255, 255, 255, .08); color: var(--paper); }
.magic-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--ribbon); color: #fff; }
.magic-text { display: grid; gap: 2px; padding-right: 24px; }
.magic-text span { color: color-mix(in srgb, var(--paper) 72%, transparent); font-size: .9rem; }
.magic .btn { grid-column: 1 / -1; justify-self: start; border-color: var(--paper); color: var(--paper); }
@media (min-width: 760px) { .magic { grid-template-columns: auto 1fr auto; padding-right: 56px; } .magic .btn { grid-column: auto; } }

.giving { margin-top: 44px; }
.section-head { margin-bottom: 14px; }
.section-head p { margin: 6px 0 0; }
.giving-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.giving-row { display: flex; align-items: center; gap: 6px; padding: 8px 10px 8px 8px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow-sm); }
.giving-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; text-decoration: none; }
.giving-img { width: 56px; height: 56px; border-radius: 10px; background: var(--plate); flex: none; overflow: hidden; display: grid; place-items: center; }
.giving-img img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.giving-text { min-width: 0; display: grid; }
.giving-text strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.giving-text .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.giving-row.done { opacity: .62; }
.giving-row.done .giving-img { filter: grayscale(.8); }
.giving-price { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* --- vue liste -------------------------------------------------------------- */
.crumb { display: inline-flex; align-items: center; gap: 4px; margin: 18px 0 0; color: var(--ink-2); text-decoration: none; font-size: .92rem; padding: 6px 10px 6px 4px; border-radius: 99px; }
.crumb:hover { background: var(--paper-2); color: var(--ink); }
.lhead { display: grid; gap: 18px; padding-bottom: 22px; }
.lhead-main { display: flex; gap: 18px; align-items: flex-start; margin-top: 10px; }
.lhead-text { min-width: 0; }
.lhead-desc { margin: 8px 0 0; color: var(--ink-2); max-width: 46em; white-space: pre-line; }
.lhead-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 0; color: var(--ink-3); font-size: .9rem; }
.lhead-meta .when { display: inline-flex; align-items: center; gap: 5px; color: var(--tone); font-weight: 600; }
.lhead-meta .when .ico { width: 15px; height: 15px; }
.lhead-actions { display: flex; align-items: center; gap: 8px; }
@media (min-width: 760px) {
  .lhead { grid-template-columns: 1fr auto; align-items: end; }
  .lhead .crumb { grid-column: 1 / -1; }
}

.adder-wrap { margin: 4px 0 20px; }
.adder {
  display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 16px; border-radius: 999px;
  background: var(--card); border: 2px dashed var(--line-2); transition: border-color .2s, box-shadow .2s;
}
.adder:focus-within { border-color: var(--ribbon); border-style: solid; box-shadow: 0 0 0 5px color-mix(in srgb, var(--ribbon) 14%, transparent); }
.adder-ico { color: var(--ink-3); display: inline-flex; }
.adder input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 2px; font-size: 1rem; outline: none; }
.adder input::placeholder { color: var(--ink-3); }
.adder .btn { min-height: 46px; padding: 0 16px; }
.adder-sub { display: flex; justify-content: center; margin-top: 4px; }
@media (min-width: 760px) { .adder-sub { justify-content: flex-start; padding-left: 18px; } }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.toolbar .hint { margin: 0; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid var(--line-2); background: transparent; font-weight: 600; font-size: .9rem; color: var(--ink-2);
}
.chip .ico { width: 15px; height: 15px; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip-n { font-variant-numeric: tabular-nums; font-weight: 500; color: var(--ink-3); }
.chip.on .chip-n { color: inherit; opacity: .8; }
.pubv .filters { margin: 0 0 16px; }

/* --- cartes cadeaux (étiquettes) ------------------------------------------- */
.ggrid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .ggrid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; } }
.ggrid.compact { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-top: 14px; }
.gcard {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); cursor: pointer;
  transition: transform .22s cubic-bezier(.2, .8, .2, 1), box-shadow .22s;
  animation: rise .45s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 35ms);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.gcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.gcard:focus-visible { outline: 2.5px solid var(--ribbon); outline-offset: 3px; }
.gcard.fav { box-shadow: 0 0 0 2px color-mix(in srgb, var(--heart) 55%, transparent), var(--shadow); }
.gcard.fresh { animation: fresh 1.4s ease; }
@keyframes fresh { 0% { transform: scale(.9); opacity: 0; } 30% { transform: scale(1.03); opacity: 1; box-shadow: 0 0 0 6px color-mix(in srgb, var(--ribbon) 30%, transparent), var(--shadow); } }
.gimg {
  position: relative; aspect-ratio: 1; margin: 7px 7px 0; border-radius: 13px; background: var(--plate);
  display: grid; place-items: center; overflow: hidden;
}
.gimg img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.gimg::after { /* œillet de l'étiquette */
  content: ''; position: absolute; top: 9px; left: 50%; width: 11px; height: 11px; margin-left: -5.5px; border-radius: 50%;
  background: var(--paper); box-shadow: inset 0 1px 2px rgba(60, 35, 15, .35), 0 0 0 2.5px color-mix(in srgb, var(--kraft) 70%, transparent);
}
.ph-art { display: grid; place-items: center; width: 100%; height: 100%; color: var(--line-2); background: repeating-linear-gradient(-45deg, transparent 0 12px, color-mix(in srgb, var(--kraft) 9%, transparent) 12px 13px); }
.ph-art .ico { width: 38%; height: 38%; max-width: 72px; max-height: 72px; }
.ph-art svg { stroke-width: 1.2; }
.price-tag {
  position: absolute; left: 8px; bottom: 8px; padding: 4px 10px 4px 16px; font-weight: 700; font-size: .86rem;
  font-variant-numeric: tabular-nums; background: var(--ink); color: var(--paper); border-radius: 4px;
  clip-path: polygon(9px 0, 100% 0, 100% 100%, 9px 100%, 0 50%);
}
.price-tag::before { content: ''; position: absolute; left: 7px; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: var(--paper); }
.heart {
  position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: color-mix(in srgb, var(--card) 92%, transparent); color: var(--ink-3); box-shadow: var(--shadow-sm);
  transition: transform .15s, color .15s; -webkit-tap-highlight-color: transparent;
}
.heart .ico { width: 21px; height: 21px; }
.heart:hover { color: var(--heart); transform: scale(1.08); }
.heart.on { color: var(--heart); }
.heart.on svg path { fill: currentColor; }
.heart.static { pointer-events: none; width: 34px; height: 34px; }
.heart.static .ico { width: 18px; height: 18px; }
.heart.pop { animation: heartpop .5s cubic-bezier(.3, 1.8, .5, 1); }
.heart.pop::after {
  content: ''; position: absolute; inset: -6px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, var(--heart) 2px, transparent 2.5px) 50% 0 / 8px 8px no-repeat,
    radial-gradient(circle, var(--heart) 2px, transparent 2.5px) 100% 50% / 8px 8px no-repeat,
    radial-gradient(circle, var(--heart) 2px, transparent 2.5px) 50% 100% / 8px 8px no-repeat,
    radial-gradient(circle, var(--heart) 2px, transparent 2.5px) 0 50% / 8px 8px no-repeat,
    radial-gradient(circle, var(--ribbon) 1.5px, transparent 2px) 12% 12% / 6px 6px no-repeat,
    radial-gradient(circle, var(--ribbon) 1.5px, transparent 2px) 88% 12% / 6px 6px no-repeat,
    radial-gradient(circle, var(--ribbon) 1.5px, transparent 2px) 88% 88% / 6px 6px no-repeat,
    radial-gradient(circle, var(--ribbon) 1.5px, transparent 2px) 12% 88% / 6px 6px no-repeat;
  animation: burst .55s ease-out forwards;
}
@keyframes heartpop { 0% { transform: scale(1); } 35% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes burst { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.7); opacity: 0; } }
.heart.small { position: static; width: 28px; height: 28px; box-shadow: none; background: transparent; pointer-events: none; }
.gbody { padding: 10px 12px 2px; flex: 1; min-width: 0; }
.gtitle {
  margin: 0; font-weight: 600; font-size: .95rem; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}
.gtitle-btn {
  all: unset; cursor: pointer; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere;
}
.gtitle-btn:focus-visible { outline: 2.5px solid var(--ribbon); outline-offset: 2px; border-radius: 4px; }
.gsite { margin: 4px 0 0; font-size: .78rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gnote {
  margin: 6px 0 0; padding: 6px 8px; font-size: .8rem; color: var(--ink-2); background: var(--paper-2); border-radius: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-style: italic;
}
.gfoot { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 8px 8px; min-height: 48px; min-width: 0; }
@media (max-width: 380px) {
  .gcard.pub .gfoot .icon-btn { display: none; }
  .gcard .gfoot .btn.small { padding: 0 10px; gap: 4px; font-size: .82rem; }
}
.gcard .gfoot .grip { box-shadow: none; background: transparent; }
.gcard .gfoot .grip:hover { background: var(--paper-2); }
.ggrid.filtered .grip { visibility: hidden; }
.gcard.got .gimg { filter: grayscale(.7); opacity: .75; }
.fav-label { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 4px; color: var(--heart); font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.fav-label .ico { width: 13px; height: 13px; }
.fav-label svg path { fill: currentColor; }

.received { margin-top: 30px; border-top: 1px dashed var(--line-2); padding-top: 14px; }
.received summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--ink-2); font-weight: 600; list-style: none; padding: 6px 0; }
.received summary::-webkit-details-marker { display: none; }
.received .gcard { cursor: default; }

.empty { text-align: center; padding: 10px 0; }
.empty .display { margin: 14px auto 8px; max-width: 16em; }
.empty p { max-width: 30em; margin: 0 auto; }
.empty-tag {
  display: inline-grid; place-items: center; width: 74px; height: 92px; margin: 20px auto 0; border-radius: 10px 10px 14px 14px;
  background: var(--card); color: var(--ribbon); box-shadow: var(--shadow); transform: rotate(-6deg); position: relative;
}
.empty-tag::before { content: ''; position: absolute; top: 10px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .3); }
.empty-tag .ico { width: 34px; height: 34px; margin-top: 14px; }
.empty-tag.ok { color: var(--ok); }
.empty-page { text-align: center; padding: 50px 0; display: grid; justify-items: center; gap: 14px; }

/* --- liste publique --------------------------------------------------------- */
.owner-banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 18px 0 0; padding: 12px 14px; border-radius: 14px;
  background: var(--ink); color: var(--paper); font-size: .9rem;
}
.owner-banner > span:not(.ico) { flex: 1; min-width: 200px; }
.owner-banner .btn { border-color: var(--paper); color: var(--paper); }
.phead { margin: 22px 0 26px; }
.envelope {
  position: relative; padding: 30px 22px 26px; border-radius: 6px; background: var(--card); box-shadow: var(--shadow);
  border: 7px solid transparent;
  background-image: linear-gradient(var(--card), var(--card)),
    repeating-linear-gradient(135deg, var(--ribbon) 0 14px, transparent 14px 22px, var(--airmail-b) 22px 36px, transparent 36px 44px);
  background-origin: border-box; background-clip: padding-box, border-box;
}
@media (min-width: 760px) { .envelope { padding: 44px 48px 38px; } }
.envelope .stamp { position: absolute; top: 18px; right: 18px; transform: rotate(6deg); }
.envelope .stamp::after { /* cachet de la poste */
  content: ''; position: absolute; left: -38px; top: 30px; width: 74px; height: 74px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--ink) 30%, transparent); pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 9px, color-mix(in srgb, var(--ink) 22%, transparent) 9px 10.5px);
  -webkit-mask: radial-gradient(circle, #000 60%, transparent 61%); mask: radial-gradient(circle, #000 60%, transparent 61%);
  opacity: .7; transform: rotate(-14deg);
}
.phead-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; font-family: var(--f-display); font-style: italic; font-size: 1.3rem; color: var(--ink-2); padding-right: 90px; }
.phead .display.xl { font-size: clamp(2.4rem, 7vw, 4.6rem); padding-right: 70px; }
@media (min-width: 760px) { .phead .display.xl { padding-right: 110px; } }
.phead-desc { margin: 14px 0 0; max-width: 44em; color: var(--ink-2); font-size: 1.05rem; white-space: pre-line; }
.phead-date { display: inline-flex; align-items: center; gap: 7px; margin: 16px 0 0; padding: 6px 12px; border-radius: 99px; background: var(--tone-soft); color: var(--tone); font-weight: 600; font-size: .9rem; }
.phead-date .ico { width: 16px; height: 16px; }
.phead-how { display: flex; align-items: flex-start; gap: 8px; margin: 18px 0 0; color: var(--ink-3); font-size: .9rem; }
.phead-how .ico { color: var(--ribbon); margin-top: 2px; }
.gcard.pub.taken .gimg img, .gcard.pub.taken .gimg .ph-art { filter: grayscale(.9); opacity: .55; }
.gcard.pub.taken .gtitle { color: var(--ink-3); }
.stamp-taken { top: 50%; margin-top: -14px; }
.rsv { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.rsv-label { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; font-size: .84rem; }
.rsv.mine .rsv-label { color: var(--ok); }
.rsv.taken .rsv-label { color: var(--ink-3); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.gcard.pub.mine { box-shadow: 0 0 0 2px color-mix(in srgb, var(--ok) 60%, transparent), var(--shadow); }
.pub-cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 40px; padding: 22px;
  border-radius: var(--r); border: 2px dashed var(--line-2);
}
.pub-cta p { margin: 4px 0 0; }

/* --- dialogues -------------------------------------------------------------- */
dialog.sheet {
  border: 0; padding: 0; color: var(--ink); background: var(--card); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 100%; max-height: 92vh; max-height: 92dvh; margin: auto 0 0; border-radius: 22px 22px 0 0;
  overflow: auto; overscroll-behavior: contain;
}
dialog.sheet[open] { animation: sheetUp .32s cubic-bezier(.2, .9, .25, 1); }
dialog.sheet::backdrop { background: rgba(30, 18, 10, .45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: fade .25s ease; }
dialog.sheet > * { padding: 8px 18px calc(18px + env(safe-area-inset-bottom)); }
@media (min-width: 640px) {
  dialog.sheet { width: min(560px, calc(100% - 40px)); margin: auto; border-radius: 22px; max-height: 88vh; }
  dialog.sheet.wide { width: min(860px, calc(100% - 40px)); }
  dialog.sheet.small { width: min(440px, calc(100% - 40px)); }
  dialog.sheet[open] { animation: sheetIn .26s cubic-bezier(.2, .9, .25, 1.1); }
  dialog.sheet > * { padding: 12px 26px 24px; }
}
@keyframes sheetUp { from { transform: translateY(100%); } }
@keyframes sheetIn { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes fade { from { opacity: 0; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 -8px 8px 0; }
.sheet-title { margin: 8px 0; font-family: var(--f-display); font-weight: 400; font-size: 1.9rem; line-height: 1.05; }
.sheet-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.sheet-actions .spacer { flex: 1; }
.confirm p { margin: 4px 0 0; }

.field { display: grid; gap: 6px; margin: 0 0 14px; min-width: 0; }
.field > span { font-size: .8rem; font-weight: 600; color: var(--ink-2); letter-spacing: .02em; }
.field input, .field textarea, .field select, .share-url, .bm-code {
  width: 100%; min-width: 0; padding: 11px 13px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--paper);
  font-size: 1rem; outline: none; transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 44px; line-height: 1.4; }
.field input:focus, .field textarea:focus, .field select:focus, .share-url:focus { border-color: var(--ribbon); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ribbon) 14%, transparent); }
.field-row { display: flex; gap: 10px; }
.field-row .grow { flex: 1; }
.field-row .field:not(.grow) { width: 110px; flex: none; }
.emoji-row { display: flex; flex-wrap: wrap; gap: 6px; }
.emoji-opt { width: 42px; height: 42px; border-radius: 12px; border: 1.5px solid transparent; background: var(--paper); font-size: 1.35rem; display: grid; place-items: center; transition: transform .12s; }
.emoji-opt:hover { transform: scale(1.1); }
.emoji-opt.on { border-color: var(--ribbon); background: color-mix(in srgb, var(--ribbon) 12%, var(--card)); }
.tone-row { display: flex; gap: 10px; flex-wrap: wrap; }
.tone-opt { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--card); background: var(--tone); box-shadow: 0 0 0 1.5px var(--line-2); }
.tone-opt.on { box-shadow: 0 0 0 2.5px var(--ink); }

.ed-grid { display: grid; gap: 18px; }
@media (min-width: 700px) { .ed-grid { grid-template-columns: 300px 1fr; gap: 26px; } }
.ed-photo { display: grid; gap: 10px; align-content: start; }
.ed-img {
  position: relative; aspect-ratio: 1; border-radius: 16px; background: var(--plate); overflow: hidden; display: grid; place-items: center;
  border: 1.5px solid var(--line); max-width: 300px; width: 100%; margin: 0 auto;
}
@media (max-width: 699px) { .ed-img { max-width: 170px; } .ed-img-actions { max-width: 260px; } }
.ed-img img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.ed-img.drop { border: 2px dashed var(--ribbon); }
.ed-img.busy::after { content: ''; position: absolute; inset: 0; background: color-mix(in srgb, var(--plate) 60%, transparent) ; }
.ed-img.busy::before { content: ''; position: absolute; z-index: 1; width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--ribbon); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ed-noimg { display: grid; justify-items: center; gap: 6px; color: #74635a; font-size: .85rem; }
.ed-noimg .ico { width: 40px; height: 40px; }
.shimmer { position: absolute; inset: 0; background: linear-gradient(100deg, #f1ebe3 30%, #fbf8f4 50%, #f1ebe3 70%) 0 0 / 300% 100%; animation: shimmer 1.2s linear infinite; }
.ed-loading-txt { position: relative; color: #74635a; font-size: .88rem; font-weight: 600; }
.ed-img-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; max-width: 300px; width: 100%; margin: 0 auto; }
.ed-nav { display: inline-flex; align-items: center; gap: 2px; }
.ed-count { font-size: .8rem; color: var(--ink-3); font-variant-numeric: tabular-nums; min-width: 40px; text-align: center; }
.ed-img-btns { display: inline-flex; gap: 6px; margin-left: auto; }
.ed-img-btns label.btn { cursor: pointer; }
.ed-img-hint { margin: 0 auto; max-width: 300px; font-size: .76rem; color: var(--ink-3); text-align: center; }
@media (hover: none) { .ed-img-hint { display: none; } }
.ed-warn { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; padding: 11px 13px; border-radius: 12px; background: color-mix(in srgb, var(--kraft) 16%, var(--card)); color: var(--ink); font-size: .87rem; }
.ed-warn .ico { color: var(--kraft); margin-top: 1px; }
.fav-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px 6px 6px; border-radius: 99px; border: 1.5px solid var(--line); cursor: pointer; font-weight: 600; font-size: .92rem; user-select: none; }
.fav-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.fav-toggle:has(input:checked) { border-color: var(--heart); color: var(--heart); background: color-mix(in srgb, var(--heart) 8%, var(--card)); }
.fav-toggle:has(input:focus-visible) { outline: 2.5px solid var(--ribbon); outline-offset: 2px; }

.share-row { display: flex; gap: 8px; margin: 16px 0; }
.share-url { font-size: .92rem; }
.share-apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; }
.share-app { display: grid; justify-items: center; gap: 6px; padding: 14px 8px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--paper); text-decoration: none; font-size: .85rem; font-weight: 600; }
.share-app:hover { border-color: var(--ink); }
.share-app .ico { width: 22px; height: 22px; color: var(--ribbon); }

.move-list { display: grid; gap: 8px; }
.move-opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--paper); text-align: left; font-weight: 600; }
.move-opt:hover { border-color: var(--ribbon); }
.move-emoji { font-size: 1.4rem; }

.reserve-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: var(--paper); margin-bottom: 12px; }
.reserve-img { width: 60px; height: 60px; border-radius: 10px; background: var(--plate); overflow: hidden; flex: none; display: grid; place-items: center; }
.reserve-img img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }

.detail-grid { display: grid; gap: 20px; }
@media (min-width: 700px) { .detail-grid { grid-template-columns: 1fr 1fr; gap: 30px; } }
.detail-img { aspect-ratio: 1; border-radius: 16px; background: var(--plate); overflow: hidden; display: grid; place-items: center; }
.detail-img img { width: 100%; height: 100%; object-fit: contain; padding: 16px; }
.detail-price { margin: 10px 0 0; font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.detail-note { margin: 16px 0 0; padding: 12px 14px; border-left: 3px solid var(--ribbon); background: var(--paper); border-radius: 0 12px 12px 0; }
.detail-note p { margin: 4px 0 0; white-space: pre-line; }
.detail-desc { margin: 14px 0 0; color: var(--ink-2); font-size: .92rem; max-height: 12em; overflow: auto; }
.rsv-inline { margin: 14px 0 0; font-weight: 600; color: var(--ink-2); }
.detail .sheet-head { margin-bottom: 0; }
.sheet-head.bare { justify-content: flex-end; }
.addv-title { margin: 0; font-weight: 600; max-width: 30em; }

/* --- ajout & compte --------------------------------------------------------- */
.addv { display: grid; place-items: center; min-height: 50vh; }
.addv-card { text-align: center; display: grid; justify-items: center; gap: 10px; padding: 30px 10px; }
.addv-card .display { margin-top: 10px; }
.account { max-width: 760px; margin: 0 auto; }
.acc-head { display: flex; align-items: center; gap: 18px; margin: 18px 0 26px; }
.acc-head .display { font-size: clamp(1.9rem, 5vw, 2.8rem); }
.acc-head p { margin: 4px 0 0; }
.acc-card { padding: 22px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow-sm); margin-bottom: 16px; }
.acc-card > p { color: var(--ink-2); }
.acc-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 0; border-top: 1px dashed var(--line); }
.acc-card h2 + .acc-row { border-top: 0; }
.bm-steps { display: grid; gap: 12px; margin: 18px 0; }
@media (min-width: 760px) { .bm-steps { grid-template-columns: repeat(3, 1fr); } }
.bm-step { padding: 14px; border-radius: 14px; background: var(--paper); }
.bm-step p { margin: 6px 0 0; font-size: .9rem; color: var(--ink-2); }
.bm-drag { margin-top: 12px; }
.bookmarklet {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px; background: var(--ribbon); color: var(--on-ribbon);
  font-weight: 700; text-decoration: none; cursor: grab; box-shadow: 0 0 0 3px var(--card), 0 0 0 5px color-mix(in srgb, var(--ribbon) 40%, transparent);
  animation: wiggle 2.8s ease-in-out infinite;
}
@keyframes wiggle { 0%, 86%, 100% { transform: rotate(0); } 90% { transform: rotate(-4deg); } 95% { transform: rotate(4deg); } }
.bm-code-row { display: grid; gap: 8px; justify-items: start; }
.bm-code { font: .75rem/1.4 ui-monospace, 'SF Mono', Menlo, monospace; resize: none; color: var(--ink-2); }
.seg { display: inline-flex; padding: 4px; border-radius: 99px; background: var(--paper-2); }
.seg-opt { border: 0; background: none; padding: 7px 14px; border-radius: 99px; font-weight: 600; font-size: .88rem; color: var(--ink-2); }
.seg-opt.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }

/* --- toasts ----------------------------------------------------------------- */
.toasts[popover] { inset: auto auto calc(18px + env(safe-area-inset-bottom)) 50%; margin: 0; border: 0; padding: 0; background: transparent; overflow: visible; color: inherit; }
.toast.in-dialog { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 5; width: max-content; max-width: calc(100% - 32px); }
.toasts { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; width: max-content; max-width: calc(100% - 32px); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 14px; background: var(--ink); color: var(--paper); box-shadow: var(--shadow-lg); font-size: .92rem; font-weight: 500; animation: toastIn .3s cubic-bezier(.2, .9, .3, 1.3); transition: opacity .4s, transform .4s; }
.toast.ok .ico { color: #7fd6a8; }
.toast.err { background: var(--ribbon); color: #fff; }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.96); } }
.noscript { text-align: center; padding: 40px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
