/* Liste de cadeaux — papier crème, rouge de Noël, vert sapin. Mobile d'abord. */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

/* Palette « papier cadeau » : kraft, papier d'étiquette, vert sapin, ruban rouge, encre. */
:root {
  --paper: #e6d2b0;        /* kraft clair : le fond de page */
  --paper-deep: #d3b88f;   /* kraft foncé : fibres, séparations */
  --card: #fffaf1;         /* papier d'étiquette */
  --ink: #2b1e17;
  --ink-soft: #5a4636;
  --ink-faint: #6a5543;  /* 4,75:1 sur le kraft */
  --line: #d9c3a0;
  --red: #c0302b;          /* ruban */
  --red-deep: #8f1f1b;
  --pine: #1d4a39;         /* sapin */
  --pine-tint: #e4ebdf;
  --gold: #c99a32;
  --gold-tint: #f5e4bd;
  --radius: 18px;
  --shadow: 0 1px 0 rgba(34, 28, 23, .05), 0 12px 28px -16px rgba(34, 28, 23, .35);
  --display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 120px; }
body {
  margin: 0;
  min-height: 100svh;
  font: 16px/1.5 var(--sans);
  color: var(--ink);
  background-color: var(--paper);
  /* Fibres du papier kraft. */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55 .9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .24 0 0 0 0 .12 0 0 0 .13 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { max-width: 100%; display: block; }
a { color: var(--red-deep); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 650; letter-spacing: -.01em; }
p { margin: 0 0 .6em; }
code { font-size: .85em; background: var(--paper-deep); padding: .1em .35em; border-radius: 6px; word-break: break-all; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--card); padding: 8px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { top: 12px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
:focus-visible { outline: 3px solid rgba(179, 48, 42, .45); outline-offset: 2px; }

/* ---------------------------------------------------------------- Boutons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 0 16px;
  border: 1.5px solid transparent; border-radius: 999px;
  font-weight: 650; font-size: 14px; line-height: 1.1; text-decoration: none; text-align: center;
  cursor: pointer; transition: transform .15s var(--ease), background-color .2s, border-color .2s, color .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn--primary { background: var(--red); color: #fff8ef; box-shadow: 0 6px 16px -10px rgba(140, 34, 29, .9); }
.btn--primary:hover { background: var(--red-deep); }
.btn--soft { background: var(--pine-tint); color: var(--pine); }
.btn--soft:hover { background: #d3e0cf; }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink-faint); }
.btn--danger { background: transparent; border-color: rgba(179, 48, 42, .5); color: var(--red-deep); }
.btn--danger:hover { background: rgba(179, 48, 42, .08); }
.btn--sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn--lg { min-height: 52px; font-size: 16px; }
.btn--block { display: flex; width: 100%; }
.linkish { background: none; border: 0; padding: 0; color: var(--red-deep); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: inherit; }

/* ---------------------------------------------------------------- En-tête : un bag charm fait main sur fond tricoté */

.wrap {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; justify-content: center; padding: 0 18px 30px; min-height: 300px;
  background-color: var(--pine);
  /* Mailles de tricot (jersey) : colonnes de V en relief. */
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, .18), transparent 30%, transparent 75%, rgba(0, 0, 0, .2)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='14'%3E%3Cpath d='M2 1.5L9 12M16 1.5L9 12' fill='none' stroke='%23000' stroke-opacity='.22' stroke-width='5' stroke-linecap='round'/%3E%3Cpath d='M2 1L9 11.5M16 1L9 11.5' fill='none' stroke='%23f3e6cf' stroke-opacity='.10' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* Le charm entier se balance une fois, depuis le haut de la cordelette. */
.charm {
  position: relative; display: flex; flex-direction: column; align-items: center; width: min(86%, 440px);
  transform: rotate(-3deg); transform-origin: 50% 0;
  animation: swing 2.4s cubic-bezier(.3, .7, .3, 1) .15s both;
}
.charm__hook { position: relative; z-index: 4; width: 60px; height: 128px; flex: 0 0 auto; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .35)); }
.charm__heart {
  position: absolute; z-index: 5; top: 110px; left: calc(50% + 4px); width: 50px;
  transform: rotate(14deg); transform-origin: 50% 0; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .35));
}
.charm__bead {
  position: absolute; z-index: 5; top: 116px; left: calc(50% - 30px); width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, #f6e2bb, #c08b52 55%, #7a5228); box-shadow: 0 3px 3px rgba(0, 0, 0, .35);
  transform: rotate(-10deg); transform-origin: 50% -10px;
}
.charm__bead::before { content: ""; position: absolute; left: 50%; top: -9px; width: 2px; height: 10px; margin-left: -1px; background: #f1e5cf; }

.tagcard { position: relative; z-index: 3; width: 100%; margin-top: -30px; filter: drop-shadow(0 14px 16px rgba(0, 0, 0, .35)); }
.tagcard__paper {
  position: relative; padding: 74px 22px 24px; text-align: center; background: var(--card);
  clip-path: polygon(14% 0, 86% 0, 100% 13%, 100% 100%, 0 100%, 0 13%);
}
.tagcard__paper::before {
  /* l'œillet où passe l'anneau */
  content: ""; position: absolute; left: 50%; top: 13px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%;
  background: var(--pine); box-shadow: 0 0 0 3px var(--gold-tint), 0 0 0 4px rgba(43, 30, 23, .25);
}
.tagcard__for { margin: 0 0 4px; font-size: 14px; color: var(--ink-faint); }
.tagcard__title { font-size: clamp(2.1rem, 9.5vw, 3.9rem); line-height: .98; font-weight: 640; font-variation-settings: "SOFT" 100, "opsz" 144; color: var(--ink); }
@keyframes swing {
  0% { transform: rotate(-11deg); }
  35% { transform: rotate(4deg); }
  60% { transform: rotate(-5deg); }
  80% { transform: rotate(-2deg); }
  100% { transform: rotate(-3deg); }
}

.intro { max-width: 1180px; margin: 0 auto; padding: 22px 18px 0; }
.intro__text { font-size: 1.06rem; line-height: 1.55; color: var(--ink-soft); max-width: 42ch; margin-bottom: 12px; }
.promise {
  display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px 14px; max-width: 560px;
  background: var(--card); color: var(--pine); border-radius: 12px; font-size: 14px; line-height: 1.45;
  box-shadow: 0 1px 0 var(--paper-deep);
}
.promise__icon { flex: 0 0 20px; width: 20px; height: 20px; margin-top: 1px; }

@media (min-width: 720px) {
  .wrap { padding-bottom: 44px; }
}

.owner-note {
  max-width: 1144px; margin: 14px auto 0; padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline;
  border: 1.5px dashed var(--pine); border-radius: 14px; color: var(--pine); font-size: 14px; background: rgba(226, 234, 223, .6);
  margin-left: max(18px, calc((100% - 1144px) / 2)); margin-right: max(18px, calc((100% - 1144px) / 2));
}
.owner-note p { margin: 0; flex: 1 1 260px; }
.owner-note form { margin: 0; }
.owner-note .linkish { color: var(--pine); font-size: 13px; }

/* ---------------------------------------------------------------- Mes tailles */

.sizes { max-width: 1180px; margin: 20px auto 0; padding: 0 18px; }
.sizes__title { font-size: 18px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.sizes__list { list-style: none; margin: 0; padding: 2px 0 6px; display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.sizes__list::-webkit-scrollbar { display: none; }
/* Étiquettes de taille tissées : fond encre, piqûre en pointillés, extrémités repliées. */
.sizes__list li {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; min-width: 76px; padding: 9px 16px 10px;
  background: linear-gradient(90deg, rgba(0, 0, 0, .28), transparent 9%, transparent 91%, rgba(0, 0, 0, .28)), #2c3446;
  color: #f4ead8; border-radius: 3px; outline: 1.5px dashed rgba(244, 234, 216, .55); outline-offset: -5px;
  box-shadow: 0 2px 0 rgba(43, 30, 23, .25);
}
.sizes__list span { font-size: 12px; opacity: .8; }
.sizes__list strong { font-family: var(--display); font-size: 21px; font-weight: 650; line-height: 1.15; letter-spacing: .02em; }

/* ---------------------------------------------------------------- Filtres */

.toolbar {
  position: sticky; top: 0; z-index: 10; margin-top: 14px; padding: 10px 0 8px;
  background: rgba(230, 210, 176, .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(222, 209, 189, .7);
}
.toolbar:has(.refine[open]) { position: relative; }
.toolbar > * { max-width: 1180px; margin-left: auto; margin-right: auto; padding-left: 18px; padding-right: 18px; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chips--wrap { flex-wrap: wrap; overflow: visible; padding: 0; }
.chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px;
  border: 1.5px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink);
  font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--ink-faint); }
.chip.is-active, .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--card); }
.chip--color { padding-left: 10px; }
.refine { margin-top: 8px; }
.refine summary {
  list-style: none; display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--ink-soft); padding: 4px 0;
}
.refine summary::-webkit-details-marker { display: none; }
.refine summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); transition: transform .2s; }
.refine[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.refine__badge { background: var(--red); color: #fff; font-size: 11px; border-radius: 999px; padding: 1px 7px; }
.refine__body { display: grid; gap: 12px; padding: 8px 0 6px; }
.refine__label { font-size: 13px; font-weight: 700; color: var(--ink-soft); margin-bottom: 6px; }
.refine__row { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.select { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.select select { min-height: 38px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); padding: 0 10px; font-size: 14px; color: var(--ink); }
.toolbar__count { font-size: 13px; color: var(--ink-faint); margin: 6px auto 0; }

/* ---------------------------------------------------------------- Cartes */

.grid {
  max-width: 1180px; margin: 0 auto; padding: 16px 14px 32px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px;
}
@media (min-width: 680px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 18px; padding: 22px 18px 40px; } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid rgba(43, 30, 23, .08);
  transition: transform .25s var(--ease), box-shadow .25s;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.card[hidden] { display: none; }
.grid.is-ready .card { animation: none; }
/* Tri et filtres : transition limitée à la grille (element.startViewTransition), quand le navigateur sait faire. */
.grid.is-moving .card { view-transition-name: match-element; }
::view-transition-group(*) { animation-duration: .38s; animation-timing-function: var(--ease); }

.card__media { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; background: var(--paper-deep); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: filter .4s, transform .6s var(--ease); }
.card__noimg { display: grid; place-items: center; height: 100%; font-size: 42px; }
.card__photo { display: block; width: 100%; height: 100%; }
.card__media.is-contain { background: #fff; }
.card__media.is-contain img { object-fit: contain; padding: 10% 6%; }

.tag {
  position: absolute; left: 10px; top: 10px; padding: 4px 10px 4px 20px;
  background: var(--card); color: var(--ink); border-radius: 4px 8px 8px 4px;
  font: 650 15px/1.2 var(--display); font-variation-settings: "SOFT" 100;
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%);
  transform: rotate(-4deg); transform-origin: left center;
}
.tag::before { content: ""; position: absolute; left: 7px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--paper-deep); box-shadow: inset 0 0 0 1px rgba(34, 28, 23, .35); }
.ribbon {
  position: absolute; right: 8px; bottom: 8px; padding: 3px 9px; border-radius: 999px;
  background: var(--gold); color: #2d1f05; font-size: 12px; font-weight: 700;
}
.ribbon::before { content: "★ "; }
.btn__icon { width: 18px; height: 18px; flex: 0 0 18px; }
.stamp {
  position: absolute; left: 50%; top: 46%; width: 104px; height: 104px; margin: -52px 0 0 -52px;
  display: none; place-items: center; text-align: center;
  border: 3px double var(--red); border-radius: 50%; background: rgba(255, 252, 246, .88);
  color: var(--red); font: 750 15px/1.05 var(--display); text-transform: uppercase; letter-spacing: .06em;
  transform: rotate(-14deg); box-shadow: 0 0 0 5px rgba(255, 252, 246, .55);
}
.card--taken .stamp { display: grid; animation: stamp .5s var(--ease) both; }
.card--taken .card__media img { filter: grayscale(.75) contrast(.9) opacity(.7); }
@keyframes stamp { from { opacity: 0; transform: rotate(-14deg) scale(1.6); } }

.card__body { display: flex; flex-direction: column; flex: 1; padding: 11px 12px 13px; }
.card__shop { font-size: 13px; color: var(--ink-faint); margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card__title {
  font-size: 17px; line-height: 1.15; font-weight: 600; font-variation-settings: "SOFT" 60, "opsz" 24; margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}
.card__note { font-size: 13px; color: var(--ink-soft); margin-bottom: 6px; line-height: 1.35; }
.swatches { list-style: none; display: flex; gap: 5px; margin: 0 0 8px; padding: 0; }
.swatch { display: inline-block; flex: 0 0 auto; width: 14px; height: 14px; border-radius: 50%; background: var(--c, #ccc); box-shadow: inset 0 0 0 1px rgba(34, 28, 23, .18); }
.swatch--blanc { box-shadow: inset 0 0 0 1px rgba(34, 28, 23, .3); }
.swatch--dore { background: linear-gradient(135deg, #f6e19a, #c8962d 55%, #8a6418); }
.swatch--argente { background: linear-gradient(135deg, #fafaf8, #b9bbbd 55%, #7a7d81); }
.swatch--transparent { background: repeating-conic-gradient(#d9d4cc 0 25%, #fff 0 50%) 0 0 / 7px 7px; }

.card__actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: auto; padding-top: 4px; }
.card__actions .btn { flex: 1 1 auto; padding: 0 10px; }
.card__actions .btn--primary { flex: 1 1 0; }
.card__actions:has([data-reserve="part"] + [data-reserve], [data-reserve] + [data-reserve="part"]) .btn--primary { flex-basis: 100%; }
.card__actions .btn--shop { flex: 0 0 40px; width: 40px; padding: 0; }
.btn--shop .btn__label { display: none; }
@media (min-width: 680px) {
  .card__actions .btn--shop { flex: 0 0 auto; width: auto; padding: 0 14px; }
  .btn--shop .btn__label { display: inline; }
}
.card__actions .linkish { font-size: 13px; }
.pill { display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 650; }
.pill--mine { background: var(--pine-tint); color: var(--pine); }
.pill--taken { background: var(--paper-deep); color: var(--ink-faint); }
.card--taken .card__title, .card--taken .card__meta { color: var(--ink-faint); }

.pot { margin: 2px 0 8px; }
.pot__bar { height: 7px; border-radius: 99px; background: var(--paper-deep); overflow: hidden; }
.pot__bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold), var(--red)); transition: width .6s var(--ease); }
.pot__text, .pot__hint { font-size: 12px; color: var(--ink-soft); margin: 4px 0 0; }
.pot__hint { margin: 0 0 8px; color: var(--pine); font-weight: 600; }
.pot__hint::before { content: "◎ "; }

.empty { text-align: center; color: var(--ink-soft); padding: 10px 18px 40px; }

.foot { max-width: 1180px; margin: 0 auto; padding: 28px 18px 40px; border-top: 1px solid var(--line); text-align: center; color: var(--ink-faint); font-size: 13px; }
.foot a { color: var(--ink-soft); }
.foot__small { font-size: 12px; }

/* ---------------------------------------------------------------- Feuille de réservation */

.sheet {
  width: 100%; max-width: 520px; max-height: 92svh; margin: auto auto 0; padding: 0; border: 0;
  background: var(--card); color: var(--ink); border-radius: 24px 24px 0 0; box-shadow: 0 -10px 40px rgba(34, 28, 23, .25);
  overflow: auto; overscroll-behavior: contain;
  /* Entrée et sortie animées du top layer (display et overlay en transition discrète). */
  opacity: 0; transform: translateY(48px);
  transition-property: opacity, transform, display, overlay;
  transition-duration: .32s;
  transition-timing-function: var(--ease);
  transition-behavior: allow-discrete;
}
.sheet[open] { opacity: 1; transform: none; }
@starting-style { .sheet[open] { opacity: 0; transform: translateY(48px); } }
.sheet:modal { overscroll-behavior: contain; }
.sheet::backdrop {
  background-color: rgba(34, 28, 23, 0);
  /* Empêche la page dessous de défiler pendant que la feuille est ouverte. */
  overflow: hidden; overscroll-behavior: contain;
  transition-property: background-color, display, overlay;
  transition-duration: .32s;
  transition-behavior: allow-discrete;
}
.sheet[open]::backdrop { background-color: rgba(34, 28, 23, .5); }
@starting-style { .sheet[open]::backdrop { background-color: rgba(34, 28, 23, 0); } }
@media (min-width: 640px) { .sheet { margin: auto; border-radius: 24px; transform: translateY(16px) scale(.98); } }
@media (min-width: 640px) { @starting-style { .sheet[open] { transform: translateY(16px) scale(.98); } } }
.sheet__panel { position: relative; padding: 22px 20px calc(20px + env(safe-area-inset-bottom)); display: grid; gap: 12px; }
.sheet__panel[hidden] { display: none; }
.sheet__close { position: absolute; right: 12px; top: 10px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--paper); font-size: 24px; line-height: 1; cursor: pointer; }
.sheet__kicker { margin: 0; font-size: 14px; font-weight: 700; color: var(--red); }
.sheet__title { font-size: 24px; line-height: 1.15; padding-right: 40px; margin: -4px 0 4px; }
.sheet__error { margin: 0; padding: 10px 12px; border-radius: 12px; background: rgba(179, 48, 42, .1); color: var(--red-deep); font-size: 14px; font-weight: 600; }
.sheet__error[hidden], [data-part-only][hidden] { display: none; }
.sheet__amount { display: grid; gap: 10px; padding: 12px; border-radius: 14px; background: var(--gold-tint); }
.sheet__done { text-align: center; justify-items: center; }
.done__seal {
  width: 74px; height: 74px; display: grid; place-items: center; margin-top: 6px;
  border-radius: 50%; background: var(--red); color: #fff8ef; font-size: 34px; font-weight: 700;
  box-shadow: 0 0 0 6px rgba(179, 48, 42, .15); animation: stamp .5s var(--ease) both;
}
.done__text { color: var(--ink-soft); margin: 0; }

.field { display: grid; gap: 6px; margin: 0; border: 0; padding: 0; min-width: 0; }
.field__label { font-size: 13px; font-weight: 700; color: var(--ink-soft); padding: 0; }
.field__label em, .check em { font-weight: 500; font-style: normal; color: var(--ink-faint); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  background: #fff; font-size: 16px; color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 96px; line-height: 1.45; }
.field input[type="file"] { padding: 10px; min-height: 0; font-size: 14px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--pine); box-shadow: 0 0 0 4px rgba(35, 73, 58, .14); }
.field__error, .form-error { color: var(--red-deep); font-size: 13px; font-weight: 600; }
/* Erreurs affichées seulement une fois le champ quitté ou le formulaire envoyé. */
.field__error--live { display: none; }
.field input:user-invalid { border-color: var(--red); background: #fff6f4; }
.field input:user-invalid ~ .field__error--live { display: block; }
.form-error { padding: 10px 12px; border-radius: 12px; background: rgba(179, 48, 42, .1); margin: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-soft); cursor: pointer; line-height: 1.35; }
.check input { width: 20px; height: 20px; flex: 0 0 20px; margin: 0; accent-color: var(--red); }
.check--wish { padding: 12px 14px; border-radius: 14px; background: var(--gold-tint); color: var(--ink); }
.hint { font-size: 13px; color: var(--ink-faint); margin: 0; line-height: 1.4; }
.hint--center { text-align: center; }
.copy { display: flex; gap: 8px; width: 100%; }
.copy input { flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font-size: 14px; color: var(--ink-soft); }

/* ---------------------------------------------------------------- Messages */

.toast {
  position: fixed; left: 50%; top: max(14px, env(safe-area-inset-top)); z-index: 100; transform: translateX(-50%);
  width: max-content; max-width: calc(100% - 28px); padding: 12px 18px; border-radius: 16px;
  background: var(--pine); color: #f4f7f1; font-size: 14px; font-weight: 600; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .5);
  animation: toast-in .4s var(--ease);
}
.toast--error { background: var(--red-deep); }
.toast.is-leaving { opacity: 0; transform: translate(-50%, -10px); transition: opacity .3s, transform .3s; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -14px); } }

.confetti { position: fixed; z-index: 200; width: 8px; height: 12px; border-radius: 2px; pointer-events: none; animation: confetti 1.1s var(--ease) forwards; }
@keyframes confetti {
  0% { transform: translate(0, 0) rotate(0); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; }
}

/* ---------------------------------------------------------------- Pages simples */

.center { min-height: 100svh; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 32px 20px; text-align: center; }
.center__mark { width: 110px; transform: rotate(-6deg); margin-bottom: 6px; }
.gift__box { fill: var(--red); }
.gift__lid { fill: var(--red-deep); }
.gift__ribbon { fill: var(--gold); }
.gift__bow { fill: var(--gold); stroke: #a87a1f; stroke-width: 2; }
.center__title { font-size: clamp(2rem, 8vw, 3rem); }
.center__text { color: var(--ink-soft); max-width: 34ch; }
.panel { width: min(100%, 420px); display: grid; gap: 14px; padding: 26px 22px; background: var(--card); border-radius: 22px; box-shadow: var(--shadow); text-align: left; }
.panel__title { font-size: 28px; }
.kicker { margin: 0; font-size: 14px; font-weight: 700; color: var(--red-deep); }
.notice { padding: 12px 14px; border-radius: 12px; background: var(--gold-tint); font-size: 14px; }

.narrow { max-width: 560px; margin: 0 auto; padding: 22px 18px 60px; display: grid; gap: 14px; }
.narrow__title { font-size: 30px; }
.back { font-size: 14px; font-weight: 600; color: var(--ink-soft); text-decoration: none; }
.res { display: grid; grid-template-columns: 110px 1fr; gap: 16px; align-items: start; padding: 14px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.res__img { width: 110px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 12px; }
.res__name { font-size: 22px; line-height: 1.15; margin-bottom: 4px; }
.res__meta { color: var(--ink-soft); font-size: 14px; }
.res__note { font-size: 14px; }
.res__who { font-size: 15px; }
.others { padding: 14px; border-radius: 14px; background: var(--pine-tint); color: var(--pine); }
.others__title { font-size: 18px; margin-bottom: 6px; }
.others ul { margin: 0 0 8px; padding-left: 18px; }

/* ---------------------------------------------------------------- Espace de Valentin */

.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 16px; background: rgba(230, 210, 176, .94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__brand { display: flex; align-items: center; gap: 8px; font: 650 20px var(--display); color: var(--ink); text-decoration: none; }
.topbar__logo { font-size: 20px; }
.topbar__nav { display: flex; align-items: center; gap: 14px; }
.topbar__link { font-size: 14px; font-weight: 600; color: var(--ink-soft); text-decoration: none; }
.topbar__link:hover { color: var(--ink); }

.admin { max-width: 860px; margin: 0 auto; padding: 18px 16px 70px; display: grid; gap: 16px; align-content: start; }
.admin--narrow { max-width: 560px; }
.admin__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.admin__title { font-size: 28px; }
.admin__count { font: 600 14px var(--sans); color: var(--ink-faint); margin-left: 6px; }
.admin__foot { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; justify-content: center; font-size: 14px; padding-top: 10px; }
.admin__foot form { margin: 0; }

.sharebox, .card-block { padding: 16px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); display: grid; gap: 10px; }
.sharebox { background: var(--pine-tint); box-shadow: none; }
.block__title { font-size: 20px; }
.card-block .form { display: grid; gap: 12px; }
.inline-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

.rows { list-style: none; margin: 0; padding: 0; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.row { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--paper-deep); }
.row:last-child { border-bottom: 0; }
.row:target { background: var(--gold-tint); }
.row__img { width: 56px; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; background: var(--paper-deep); display: grid; place-items: center; text-decoration: none; }
.row__img img { width: 100%; height: 100%; object-fit: cover; }
.row__main { min-width: 0; }
.row__name { display: block; font: 600 16px/1.2 var(--display); color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__meta, .row__note { font-size: 13px; color: var(--ink-faint); margin: 2px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__note { color: var(--ink-soft); }
.row__wish { margin: 0; }
.tagchip { color: var(--pine); font-weight: 600; }
.star { width: 42px; height: 42px; border: 0; border-radius: 50%; background: transparent; font-size: 22px; color: var(--line); cursor: pointer; transition: color .2s, transform .2s var(--ease); }
.star:hover { color: var(--ink-faint); }
.star.is-on { color: var(--gold); }
.star:active { transform: scale(1.25) rotate(12deg); }

/* Tableau de bord façon CMS */
.admin__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cms-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.cms-tools .chips { flex-wrap: wrap; }
.chip span { opacity: .65; font-weight: 700; }
.cms-search { flex: 1 1 200px; max-width: 320px; min-height: 40px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; font-size: 15px; }
.cms-search:focus { outline: none; border-color: var(--pine); box-shadow: 0 0 0 4px rgba(35, 73, 58, .14); }
.row { grid-template-columns: 56px minmax(0, 1fr); grid-template-areas: "img main" "img actions"; row-gap: 6px; }
.row__img { grid-area: img; align-self: start; }
.row__main { grid-area: main; }
.row__actions { grid-area: actions; display: flex; gap: 4px; align-items: center; }
.row__actions form { margin: 0; }
@media (min-width: 620px) {
  .row { grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: "img main actions"; }
  .row__img { align-self: center; }
}
.row[hidden] { display: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--ink-faint); font-size: 20px; line-height: 1; cursor: pointer; text-decoration: none;
  transition: background-color .2s, color .2s, transform .15s var(--ease);
}
.icon-btn svg { width: 20px; height: 20px; fill: currentColor; }
@media (pointer: coarse) { .icon-btn { width: 44px; height: 44px; } }
.icon-btn:hover { background: var(--paper); color: var(--ink); }
.icon-btn:active { transform: scale(.92); }
.icon-btn--danger:hover { color: var(--red-deep); background: rgba(179, 48, 42, .08); }
.icon-btn.star { color: var(--line); }
.icon-btn.star.is-on { color: var(--gold); }
.icon-play { display: none; }
.row.is-paused .icon-pause { display: none; }
.row.is-paused .icon-play { display: inline-grid; color: var(--pine); }
.row__badge { display: none; margin-right: 6px; padding: 1px 8px; border-radius: 999px; background: var(--paper-deep); color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.row.is-paused .row__badge { display: inline-block; }
.row.is-paused .row__img, .row.is-paused .row__name { opacity: .55; }
.admin__legend { text-align: center; }
.profile-read { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
.profile-read .tagchip { padding: 2px 10px; border-radius: 999px; background: var(--pine-tint); }
.apply-log { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 13px; color: var(--ink-soft); max-height: 320px; overflow: auto; }
.apply-log .is-ok { color: var(--pine); }
.apply-log .is-warn { color: #8a6418; }
.apply-log .is-skip { color: var(--ink-faint); }

.trash { font-size: 14px; color: var(--ink-soft); }
.trash summary { cursor: pointer; font-weight: 600; }
.trash ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.trash li { display: flex; justify-content: space-between; gap: 10px; }
.trash form { margin: 0; }

.paste { display: flex; gap: 8px; }
.paste input { flex: 1; min-width: 0; min-height: 52px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; font-size: 16px; }
.paste input:focus { outline: none; border-color: var(--pine); box-shadow: 0 0 0 4px rgba(35, 73, 58, .14); }
.paste .btn { min-height: 52px; }
.quick { display: grid; gap: 12px; }
.quick__status { margin: 0; font-size: 14px; color: var(--ink-soft); min-height: 1.4em; }
.quick__status.is-error { color: var(--red-deep); font-weight: 600; }
.quick__status.is-loading::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; border: 2px solid var(--line); border-top-color: var(--red); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }
.quick__body { display: grid; gap: 12px; padding: 16px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); animation: rise .4s var(--ease); }
.quick__body[hidden] { display: none; }
.quick__media { position: relative; width: min(100%, 220px); aspect-ratio: 4 / 5; margin: 0 auto 4px; border-radius: 14px; overflow: hidden; background: var(--paper-deep); display: grid; place-items: center; }
.quick__media img { width: 100%; height: 100%; object-fit: cover; }
.quick__media img[hidden], .quick__noimg[hidden] { display: none; }
.quick__noimg { font-size: 40px; }
.quick__upload { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); white-space: nowrap; padding: 6px 12px; border-radius: 999px; background: rgba(34, 28, 23, .75); color: #fff; font-size: 12px; font-weight: 650; cursor: pointer; }
.quick__upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.added { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 12px; border-radius: var(--radius); background: var(--pine-tint); animation: rise .4s var(--ease); }
.added img { width: 56px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; }
.added__name { font: 600 17px/1.2 var(--display); margin: 2px 0 0; }
.added__meta { font-size: 13px; color: var(--ink-soft); margin: 0; }
.tips { font-size: 14px; color: var(--ink-soft); background: var(--card); border-radius: 14px; padding: 12px 14px; }
.tips summary { cursor: pointer; font-weight: 650; color: var(--ink); }
.tips ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; }

.colorpick { display: flex; flex-wrap: wrap; gap: 6px; }
.colorpick__item { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 11px 0 8px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; font-size: 13px; font-weight: 600; cursor: pointer; }
.colorpick__item input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.colorpick__item:has(input:checked) { border-color: var(--ink); background: var(--ink); color: var(--card); }
.colorpick__item:has(input:focus-visible) { outline: 3px solid rgba(179, 48, 42, .45); }

.form { display: grid; gap: 14px; }
.imgedit { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: start; }
.imgedit__preview { width: 96px; aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; background: var(--paper-deep); display: grid; place-items: center; font-size: 30px; }
.imgedit__preview img { width: 100%; height: 100%; object-fit: cover; }
.imgedit__fields { display: grid; gap: 10px; min-width: 0; }
.danger-zone { display: flex; justify-content: center; padding-top: 6px; }

.sizes-edit { display: grid; gap: 8px; }
.sizes-edit__row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sizes-edit__row input { min-height: 46px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font-size: 16px; }

.bookmarklet { display: inline-block; margin-left: 4px; padding: 4px 12px; border-radius: 999px; background: var(--red); color: #fff8ef; font-weight: 700; font-size: 13px; text-decoration: none; cursor: grab; }
.diag { margin: 0; display: grid; gap: 4px; font-size: 14px; }
.diag div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--line); padding: 4px 0; }
.diag dt { color: var(--ink-soft); }
.diag dd { margin: 0; font-weight: 600; text-align: right; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .charm { animation: none; }
  .sheet, .sheet[open] { transform: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ---------------------------------------------------------------- Espace : habillage façon CMS */

.sidenav { display: none; }
.tabbar {
  position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: rgba(255, 250, 241, .96);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
}
.tabbar__link { display: grid; justify-items: center; gap: 2px; padding: 6px 0; border-radius: 12px; color: var(--ink-faint); font-size: 12px; font-weight: 650; text-decoration: none; }
.tabbar__link svg { width: 22px; height: 22px; fill: currentColor; }
.tabbar__link.is-active { color: var(--red-deep); background: var(--paper); }
body.page-admin { padding-bottom: 80px; }
.page-quick .topbar .btn { display: none; }

@media (min-width: 900px) {
  body.page-admin { padding: 0 0 0 248px; }
  .topbar, .tabbar { display: none; }
  .sidenav {
    position: fixed; z-index: 30; inset: 0 auto 0 0; width: 248px; display: flex; flex-direction: column; gap: 4px;
    padding: 22px 14px; background: var(--ink); color: #f4ead8; overflow-y: auto;
  }
  .sidenav__brand { display: flex; gap: 10px; align-items: center; margin: 0 6px 20px; color: #fffaf1; text-decoration: none; font: 650 21px/1.1 var(--display); }
  .sidenav__brand small { display: block; margin-top: 3px; font: 500 12px var(--sans); color: rgba(244, 234, 216, .62); }
  .sidenav__logo { font-size: 24px; }
  .sidenav__link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: rgba(244, 234, 216, .8); font-size: 15px; font-weight: 600; text-decoration: none; }
  .sidenav__link svg { width: 20px; height: 20px; flex: 0 0 20px; fill: currentColor; }
  .sidenav__link:hover { background: rgba(255, 255, 255, .07); color: #fffaf1; }
  .sidenav__link.is-active { background: var(--card); color: var(--ink); }
  .sidenav__link--out { margin-top: auto; }
}

.admin--wide { max-width: 1180px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; }
.page-head__sub { margin: 4px 0 0; color: var(--ink-soft); font-size: 15px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--pine-tint); color: var(--pine); font-size: 13px; font-weight: 700; }
.status-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-pill--paused { background: var(--paper-deep); color: var(--ink-soft); }

.cms-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 12px; background: var(--paper-deep); }
.segmented__btn { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-soft); font-size: 14px; font-weight: 650; cursor: pointer; }
.segmented__btn span { color: var(--ink-faint); font-weight: 700; }
.segmented__btn.is-active, .segmented__btn:has(input:checked) { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(43, 30, 23, .15); }
.segmented__btn input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented__btn:has(input:focus-visible) { outline: 3px solid rgba(192, 48, 43, .45); }
.segmented--block { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
.segmented--block .segmented__btn { justify-content: center; }
.select--compact select { min-height: 40px; }
.viewtoggle { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--paper-deep); }
.viewtoggle__btn { display: grid; place-items: center; width: 40px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-faint); cursor: pointer; }
.viewtoggle__btn svg { width: 18px; height: 18px; fill: currentColor; }
.viewtoggle__btn.is-active { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(43, 30, 23, .15); }

.agrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .agrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1150px) { .agrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.acard { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--card); border: 1px solid rgba(43, 30, 23, .08); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); transition: box-shadow .2s, border-color .2s; }
.acard[hidden] { display: none; }
.acard.is-selected { border-color: var(--red); box-shadow: 0 0 0 3px rgba(192, 48, 43, .25); }
.acard__media { display: grid; place-items: center; aspect-ratio: 1; background: #fff; text-decoration: none; font-size: 34px; }
.acard__media img { width: 100%; height: 100%; object-fit: contain; padding: 8%; }
.acard.is-paused .acard__media img, .acard.is-trash .acard__media img { opacity: .45; filter: grayscale(.6); }
.acard__check { position: absolute; z-index: 2; top: 8px; left: 8px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(255, 250, 241, .94); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); cursor: pointer; }
.acard__check input { width: 18px; height: 18px; margin: 0; accent-color: var(--red); }
.acard__badge { display: none; position: absolute; z-index: 2; top: 12px; right: 10px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.acard.is-paused .acard__badge--paused { display: block; background: var(--ink); color: #f4ead8; }
.acard.is-trash .acard__badge--trash { display: block; background: var(--red-deep); color: #fff; }
.acard__body { flex: 1; min-width: 0; padding: 10px 12px 0; }
.acard__shop { margin: 0; font-size: 12px; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acard__name { font: 600 16px/1.2 var(--display); margin: 2px 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.acard__name a { color: var(--ink); text-decoration: none; }
.acard__name a:hover { text-decoration: underline; }
.acard__info { margin: 0; font-size: 13px; color: var(--ink-soft); }
.acard__info strong { color: var(--ink); margin-right: 4px; }
.acard__actions { display: flex; align-items: center; gap: 2px; margin-top: 8px; padding: 4px 6px 6px; border-top: 1px solid var(--paper-deep); }
.acard__actions form { margin: 0; }
.acard__actions .icon-btn--danger { margin-left: auto; }
.acard.is-paused .icon-pause { display: none; }
.acard.is-paused .icon-play { display: inline-grid; color: var(--pine); }

.agrid.is-list { grid-template-columns: 1fr; gap: 0; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.agrid.is-list .acard { flex-direction: row; flex-wrap: wrap; align-items: center; padding: 8px 8px 8px 52px; border: 0; border-bottom: 1px solid var(--paper-deep); border-radius: 0; box-shadow: none; }
.agrid.is-list .acard.is-selected { background: #fff3ef; }
.agrid.is-list .acard__check { top: 50%; left: 8px; transform: translateY(-50%); background: transparent; box-shadow: none; }
.agrid.is-list .acard__media { flex: 0 0 52px; width: 52px; border-radius: 10px; font-size: 22px; }
.agrid.is-list .acard__media img { padding: 4%; }
.agrid.is-list .acard__body { flex: 1 1 180px; padding: 0 12px; }
.agrid.is-list .acard__badge { top: 8px; right: 8px; }
.agrid.is-list .acard__actions { margin: 0; padding: 0; border: 0; }

.bulkbar {
  position: fixed; z-index: 40; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(calc(100% - 24px), 780px); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px;
  border-radius: 16px; background: var(--ink); color: #f4ead8; box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .55);
}
.bulkbar[hidden], .bulkbar [hidden] { display: none; }
.bulkbar__count { font-weight: 700; }
.bulkbar__actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bulkbar .btn--soft { background: rgba(255, 255, 255, .12); color: #fffaf1; }
.bulkbar .btn--danger { color: #ffb4ab; border-color: rgba(255, 180, 171, .55); }
.bulkbar .linkish { color: #f4ead8; font-size: 14px; }
@media (min-width: 900px) { .bulkbar { bottom: 24px; left: calc(50% + 124px); } }

.editor { display: grid; gap: 16px; align-items: start; }
@media (min-width: 1000px) {
  .editor { grid-template-columns: minmax(0, 1fr) 340px; }
  .editor__side { position: sticky; top: 20px; }
}
.editor__main, .editor__side { display: grid; gap: 16px; min-width: 0; }
.preview-card { max-width: 260px; margin: 0 auto; width: 100%; }
.preview-card.is-paused-preview { opacity: .5; }
.preview-card .card__actions .btn { pointer-events: none; }
.editor__save { position: sticky; z-index: 5; bottom: calc(84px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .editor__save { position: static; } }

.guest-notice {
  max-width: 1144px; margin: 14px max(18px, calc((100% - 1144px) / 2)) 0; padding: 12px 16px;
  border-radius: 14px; background: var(--card); border-left: 4px solid var(--red); font-size: 14px;
}

@media (max-width: 640px) {
  .cms-bar .segmented { max-width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .cms-bar .segmented::-webkit-scrollbar { display: none; }
  .cms-bar .segmented__btn { flex: 0 0 auto; }
  .cms-search { max-width: none; }
}

/* Mes tailles : précisions (mesures en cm, diamètre de chaque doigt) */
.sizes-edit__row .sizes-edit__detail { grid-column: 1 / -1; min-height: 40px; font-size: 14px; color: var(--ink-soft); }
.sizes-edit__row { padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.sizes__more { margin-top: 10px; font-size: 14px; color: var(--ink-soft); }
.sizes__more summary { cursor: pointer; font-weight: 650; color: var(--ink); width: fit-content; }
.sizes__more dl { margin: 10px 0 8px; display: grid; gap: 6px; max-width: 640px; }
.sizes__more dl div { display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding: 8px 12px; background: var(--card); border-radius: 10px; }
.sizes__more dt { font-weight: 700; color: var(--ink); }
.sizes__more dd { margin: 0; line-height: 1.4; }
.sizes-edit__row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.sizes-edit__row input { width: 100%; min-width: 0; }
