/* Configurateur VKARD — styles (mobile d'abord). */
:root {
  --stage: #eef2f7;          /* blanc neutre légèrement bleuté : met la carte en valeur */
  --ink: #0f172a;
  --muted: #5b6678;
  --line: #e2e8f0;
  --panel: #ffffff;
  --soft: #f1f5f9;
  --primary: #0f172a;
  --brand: #4199d5; /* bleu du logo VKARD */
  --brand-dark: #2f82bd;
  --sel: #2563eb;
  --guide: #e11d8f;
  --danger: #dc2626;
  --ok: #15803d;
  --warn: #b45309;
  --r: 14px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
/* Pas de zoom au double-tap sur mobile (le pinch reste possible). */
html, body, button, a, label, .tool, .mat-card, .dlg { touch-action: manipulation; }
body {
  font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--stage);
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}
body.dragging { user-select: none; -webkit-user-select: none; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: default; opacity: .38; }
:focus-visible { outline: 2px solid var(--sel); outline-offset: 2px; }

#app { height: 100dvh; display: flex; flex-direction: column; }
.screen { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* ---------- Boutons ---------- */
.btn {
  min-height: 44px; padding: 0 16px; border-radius: 12px; font-weight: 600;
  background: var(--soft); display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn.primary { background: var(--primary); color: #fff; }
.btn.big { min-height: 54px; width: 100%; font-size: 16px; border-radius: 16px; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13.5px; }
.btn.ok { min-height: 40px; padding: 0 14px; background: var(--primary); color: #fff; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; display: inline-grid; place-items: center; flex: none; }
.icon-btn.sm { width: 40px; height: 40px; }
.icon-btn.danger { color: var(--danger); }
.link { color: var(--muted); font-size: 13.5px; text-decoration: underline; min-height: 36px; align-self: center; }
@media (hover: hover) {
  .icon-btn:not(:disabled):hover, .btn:not(.primary):not(.blue):not(:disabled):hover, .tool:hover .tool-ic, .tg:not(:disabled):hover { background: #e2e8f0; }
}

.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: rgba(15, 23, 42, .07); }
.seg button {
  min-height: 38px; padding: 0 18px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--muted);
  display: inline-flex; align-items: center; gap: 8px;
}
.seg button.wide { flex: 1.7; }
.seg button { white-space: nowrap; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .16); }

/* ---------- Choix de la carte ---------- */
#pick { overflow-y: auto; background: #f8faff; }
.pick-head { position: relative; padding: max(22px, env(safe-area-inset-top)) 20px 6px; max-width: 560px; width: 100%; margin: 0 auto; }
/* Badge « Made in France » : accueil seulement, en haut à droite, face au nom VKARD. */
.made-fr { position: absolute; top: max(14px, calc(env(safe-area-inset-top) - 8px)); right: 20px; width: 54px; height: 54px; }
.brand { font-weight: 800; letter-spacing: .22em; font-size: 13px; }
.pick-head h1 { margin: 10px 0 4px; font-size: 27px; line-height: 1.15; letter-spacing: -.01em; text-wrap: balance; }
.pick-head p { margin: 0; color: var(--muted); }
.mat-list { display: grid; gap: 12px; padding: 16px; max-width: 560px; width: 100%; margin: 0 auto; }
.mat { background: #ebf1fa; border-radius: 20px; border: 2px solid transparent; box-shadow: 0 1px 2px rgba(15, 23, 42, .06); transition: border-color .15s; }
.mat.on { border-color: var(--ink); }
.mat-main { display: grid; grid-template-columns: 44% 1fr auto; align-items: center; gap: 14px; width: 100%; padding: 14px; text-align: left; border-radius: 18px; cursor: pointer; }
.mat-card { border-radius: 3.71% / 5.88%; box-shadow: 0 1px 1px rgba(15, 23, 42, .12), 0 8px 14px -6px rgba(15, 23, 42, .3); }
.mat-card svg { display: block; width: 100%; border-radius: inherit; }
.mat-card { position: relative; }
.mat-stage { padding: 0; } /* la carte et son ombre posées directement sur le fond #ebf1fa de la boîte */
.mat-flip { position: absolute; right: 8px; top: 8px; width: 34px; height: 34px; border-radius: 50%; border: 0; padding: 0; background: rgba(255, 255, 255, .92); color: var(--ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .3); display: grid; place-items: center; cursor: pointer; }
.mat-flip svg { width: 22px; height: 22px; }
@media (max-width: 899px) {
  .mat-flip { width: 26px; height: 26px; right: 4px; top: 4px; }
  .mat-flip svg { width: 15px; height: 15px; }
}
.mat-info { display: grid; gap: 2px; min-width: 0; }
.mat-info strong { font-size: 17px; }
.mat-info span { color: var(--muted); font-size: 13.5px; }
.mat-radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #cbd5e1; }
.mat.on .mat-radio { border-color: var(--ink); background: radial-gradient(circle, var(--ink) 0 45%, transparent 50%); }
.mat-opts { margin: 0 14px 14px; display: flex; }
.mat-opts button { flex: 1; justify-content: center; }
.mat-opts button.wide { flex: 1.8; }
.dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(15, 23, 42, .25); }
.dot-pvc-white { background: #fff; }
.dot-pvc-black { background: #0b0c0b; }
.dot-metal-gold { background: linear-gradient(135deg, #a07d12, #f3e08f); }
.dot-metal-silver { background: linear-gradient(135deg, #8f9298, #fff); }
.pick-cta {
  position: sticky; bottom: 0; margin-top: auto; padding: 12px 16px max(14px, env(safe-area-inset-bottom));
  background: linear-gradient(to top, #f8faff 70%, transparent);
}
.pick-cta .btn { max-width: 528px; margin: 0 auto; display: flex; }
/* Rebond du bouton (arrivée sur l'écran, changement de produit) : un saut puis un petit rebond, comme une balle —
   montée qui ralentit, chute qui accélère, jamais sous la ligne de base, largeur inchangée. */
.cta-pop { animation: cta-pop 1.05s linear .25s both; }
@keyframes cta-pop {
  0% { transform: translateY(0); animation-timing-function: cubic-bezier(.3, .75, .55, 1); }
  28% { transform: translateY(-22px); animation-timing-function: cubic-bezier(.45, 0, .7, .25); }
  56% { transform: translateY(0); animation-timing-function: cubic-bezier(.3, .75, .55, 1); }
  72% { transform: translateY(-6px); animation-timing-function: cubic-bezier(.45, 0, .7, .25); }
  88%, 100% { transform: translateY(0); }
}
.pick-cta .pick-fresh { display: block; margin: 4px auto 0; min-height: 36px; padding: 0 12px; background: none; border: 0; cursor: pointer; }

/* « Mes designs » : designs validés depuis ce navigateur, à rouvrir. */
.my-designs { padding: 4px 16px 8px; max-width: 560px; width: 100%; margin: 0 auto; }
.my-designs h2 { margin: 8px 0 10px; font-size: 17px; }
.my-designs ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.my-designs li { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px 12px; padding: 10px; background: #ebf1fa; border-radius: 14px; box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 6px 16px -8px rgba(15, 23, 42, .25); }
.my-thumbs { display: flex; gap: 6px; padding: 2px; }
.my-thumbs.my-stack { flex-direction: column; gap: 8px; }
.my-designs img.my-thumb { width: 72px; height: 45.5px; object-fit: contain; }
.my-info { display: grid; gap: 2px; min-width: 0; }
.my-thumb { width: 72px; border-radius: 3px; overflow: hidden; background: #fff; box-shadow: 0 1px 1px rgba(15, 23, 42, .12), 0 5px 10px -5px rgba(15, 23, 42, .35); }
.my-thumb svg { display: block; width: 100%; height: auto; }
.my-designs .badge { font-style: normal; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--brand); margin-left: 4px; }
.my-acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; }
.my-acts .btn { padding-inline: 14px; }
.mat-price { font-weight: 600; color: var(--brand-dark, var(--brand)); white-space: nowrap; }
.mat-was { font-weight: 500; color: var(--muted); }
.mat-price.promo { white-space: normal; }
.mat-price.promo .mat-was, .mat-price.promo .mat-now { white-space: nowrap; }
.lang-switch { display: flex; justify-content: center; align-items: center; gap: 6px; padding: 22px 16px 8px; font-size: 13px; color: var(--muted); }
.lang-switch button { padding: 4px 2px; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 600; letter-spacing: .04em; cursor: pointer; text-underline-offset: 4px; }
.lang-switch button:hover { color: var(--ink); }
.lang-switch button[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; }
.my-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 10px; }
.my-head h2 { margin: 0; }
.my-head .btn.sm { min-height: 34px; padding-inline: 12px; font-size: 13.5px; }
.my-head .btn.sm[aria-pressed="true"] { background: var(--ink); color: #fff; }
/* Mode sélection : la ligne entière se coche, les actions individuelles disparaissent */
.my-designs.selecting li { cursor: pointer; grid-template-columns: 28px auto 1fr; user-select: none; -webkit-user-select: none; }
.my-designs.selecting .my-acts { display: none; }
.my-designs li.on { box-shadow: 0 0 0 2px var(--sel), 0 6px 16px -8px rgba(15, 23, 42, .25); }
.sel-box { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #94a3b8; background: #fff; display: grid; place-items: center; color: #fff; }
.sel-box svg { width: 16px; height: 16px; opacity: 0; }
li.on .sel-box { background: var(--brand); border-color: var(--brand); }
li.on .sel-box svg { opacity: 1; }
.sel-bar { display: flex; gap: 8px; }
.sel-bar .btn { flex: 1; margin: 0; max-width: none; justify-content: center; }
.sel-bar .btn:first-child { flex: 0 0 auto; }
.sel-bar .btn.off { opacity: .45; pointer-events: none; }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger:disabled { opacity: .45; }
.my-acts .btn:not(.blue), .my-acts .icon-btn.sm { background: #fff; }
.my-acts .icon-btn.sm { width: 36px; height: 36px; color: var(--muted); }
.my-acts .icon-btn.sm.danger { color: var(--danger); }
.dup-dlg .dlg-foot .btn { flex: 1 1 45%; }
.my-info small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.my-info .my-num { font-size: 13.5px; font-weight: 600; color: var(--ink); }

/* reCAPTCHA v3 : badge masqué, mention affichée à la validation (autorisé par Google). */
.grecaptcha-badge { visibility: hidden; }
.rc-note { font-size: 12px; }
.rc-note a { color: inherit; }

/* ---------- Éditeur ---------- */
.topbar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; padding: 6px 10px 6px 4px; padding-top: max(6px, env(safe-area-inset-top));
  background: #fff; border-bottom: 1px solid var(--line);
}
.tb-left, .tb-right { display: flex; align-items: center; gap: 2px; min-width: 0; }
.tb-right { justify-content: flex-end; }
.tb-logo { display: block; width: 32px; height: 27px; }
.tb-logo img { display: block; width: 100%; height: 100%; }
a.home-link { color: inherit; text-decoration: none; }
a.home-link:hover { opacity: .75; }
.tb-title { flex: 1; min-width: 0; display: grid; line-height: 1.2; padding-left: 2px; }
.tb-title strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-title small { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-title small.err { color: var(--warn); }
.topbar .btn.primary { margin-left: 4px; padding: 0 16px; background: var(--brand); box-shadow: 0 1px 3px rgba(65, 153, 213, .35); }
.topbar .btn.primary:hover { background: var(--brand-dark); }
@media (max-width: 480px) { .tb-title strong { display: none; } .tb-title small { font-size: 11px; } .topbar .btn.primary { padding: 0 12px; } }
.topbar .btn.primary { white-space: nowrap; }
.topbar .btn.primary .short { display: none; }
/* Téléphones (jusqu'aux grands iPhone) : pas de logo au centre, libellé court, deux colonnes seulement. */
@media (max-width: 560px) {
  .topbar .btn.primary .long { display: none; } .topbar .btn.primary .short { display: inline; }
  .topbar { grid-template-columns: 1fr auto; } .tb-logo { display: none; }
  .tb-right { flex: none; }
}

.stage {
  flex: 1; min-height: 150px; container-type: size;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 14px 16px;
  background: radial-gradient(110% 85% at 50% 38%, #fafcfe 0%, var(--stage) 58%, #e2e8f0 100%);
  overflow: hidden;
}
.card-wrap {
  position: relative; flex: none;
  width: min(100%, calc((100cqh - 60px) * 1.5833), 600px);
  aspect-ratio: 242.36 / 153.07;
  border-radius: 3.71% / 5.88%;
  box-shadow:
    0 2px 2px rgba(15, 23, 42, .16),
    0 8px 14px -3px rgba(15, 23, 42, .24),
    0 28px 40px -12px rgba(15, 23, 42, .42),
    0 56px 72px -28px rgba(15, 23, 42, .48);
}
.card-wrap.flip, .mat-card.flip { animation: flip .36s ease-in-out; }
@keyframes flip { 0%, 100% { transform: perspective(900px) rotateY(0); } 50% { transform: perspective(900px) rotateY(90deg); } }
#card { display: block; width: 100%; height: 100%; border-radius: inherit; touch-action: none; user-select: none; -webkit-user-select: none; }
#card .el { cursor: grab; }
#card .el[data-type="ydh"] { cursor: default; }
#card .ydh-trash, #card .add-ph { cursor: pointer; }
.ui { display: none; }
#card .add-ph, #card.ydh-sel .ydh-trash { display: block; }
/* Au-dessus de l'ombre portée de la carte, et un peu plus bas pour en sortir. */
.under { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; position: relative; z-index: 1; margin-top: 10px; }
.under .seg { background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .16); }
.situ { min-height: 40px; padding: 0 14px; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .16); font-weight: 600; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.situ svg { width: 18px; height: 18px; }
#overlay { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
/* Règles : quadrillage 5 mm sur toute la scène (trait plus marqué tous les 10 mm), interface seulement, jamais exporté. */
.stage { position: relative; }
.grid-ov { position: absolute; inset: 0; pointer-events: none; display: none; z-index: 1; --sx: 20px; --sy: 20px; /* au-dessus de la carte, sous les poignées */
  background-image:
    linear-gradient(to right, rgba(65, 153, 213, .2) 1px, transparent 1px), linear-gradient(to bottom, rgba(65, 153, 213, .2) 1px, transparent 1px);
  background-size: var(--sx) var(--sy); }
.stage.show-grid .grid-ov { display: block; }
.stage-tools { position: absolute; top: 10px; right: 12px; display: inline-flex; gap: 6px; z-index: 2; }
/* Astuces en bas de la scène */
/* Mobile : bandeau statique tout en bas de l'éditeur (sous le panneau) ; grand écran : bulle dans la scène. */
.tips { flex: none; margin: 0 auto; max-width: 92%; }
#editor > .tips { display: flex; background: var(--panel); border-radius: 0; box-shadow: none; border-top: 1px solid var(--line); padding: 6px 14px max(8px, env(safe-area-inset-bottom)); width: 100%; max-width: none; justify-content: center; }
.stage > .tips { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 2; max-width: min(92%, 640px); }
.tips {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .92); box-shadow: 0 1px 3px rgba(15, 23, 42, .16); color: var(--muted); font-size: 12.5px; line-height: 1.3; }
.tips .tip-ic { flex: none; color: var(--brand); display: grid; }
.tips .tip-ic svg { width: 16px; height: 16px; }
.tip-text { transition: opacity .28s; }
.tip-text.out { opacity: 0; }
@media (max-height: 560px) { .tips { display: none; } }
.tool-ic-btn { width: 40px; padding: 0; justify-content: center; }
.tool-ic-btn svg { width: 20px; height: 20px; }
.tool-ic-btn[aria-pressed="true"] { background: var(--ink); color: #fff; }
/* Infobulle visible au survol / au focus (et au toucher tant que le doigt reste), sous le bouton, calée à droite. */
.stage-tools button { position: relative; }
.stage-tools button::after {
  content: attr(data-tip); position: absolute; top: calc(100% + 8px); right: 0; white-space: nowrap;
  background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 600; padding: 6px 10px; border-radius: 8px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .2); opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .12s, transform .12s;
}
.stage-tools button:hover::after, .stage-tools button:focus-visible::after, .stage-tools button:active::after { opacity: 1; transform: none; }
.sel { position: absolute; border: 1.5px solid var(--sel); border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .75); }
.sel.locked { border-style: dashed; }
.h {
  position: absolute; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 1.5px solid var(--sel);
  box-shadow: 0 1px 3px rgba(15, 23, 42, .3); pointer-events: auto; touch-action: none; cursor: nwse-resize;
}
.h::after { content: ""; position: absolute; inset: -13px; border-radius: 50%; }
.h.tl { left: -8px; top: -8px; }
.h.tr { right: -8px; top: -8px; cursor: nesw-resize; }
.h.bl { left: -8px; bottom: -8px; cursor: nesw-resize; }
.h.br { right: -8px; bottom: -8px; }
.h.e { right: -8px; top: 50%; margin-top: -7px; cursor: ew-resize; }
.h.s { left: 50%; bottom: -8px; margin-left: -7px; cursor: ns-resize; }
.sel-trash {
  /* En diagonale, assez loin de la poignée du coin pour qu'on n'efface pas l'élément en voulant le redimensionner. */
  position: absolute; right: -46px; top: -56px; width: 30px; height: 30px; border-radius: 50%; border: 0; padding: 0;
  background: #fff; color: var(--danger); box-shadow: 0 1px 3px rgba(15, 23, 42, .3); pointer-events: auto; touch-action: none;
  display: grid; place-items: center; cursor: pointer;
}
.sel-trash svg { width: 15px; height: 15px; }
.sel-trash::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; }
.h.rot { left: 50%; top: -34px; margin-left: -7px; cursor: grab; }
.h.rot::before { content: ""; position: absolute; left: 50%; top: 13px; width: 1.5px; height: 19px; margin-left: -.75px; background: var(--sel); }
.guide { position: absolute; background: var(--guide); }
.guide.v { top: -14px; bottom: -14px; width: 1px; }
.guide.hz { left: -14px; right: -14px; height: 1px; }

/* ---------- Panneau ---------- */
.panel {
  flex: none; background: var(--panel); border-radius: 20px 20px 0 0; box-shadow: 0 -6px 24px rgba(15, 23, 42, .08);
  padding: 12px 14px max(14px, env(safe-area-inset-bottom)); max-height: 50dvh; overflow-y: auto; overscroll-behavior: contain;
}
.sheet { display: flex; flex-direction: column; gap: 12px; max-width: 560px; margin: 0 auto; }
.sheet-head { display: flex; align-items: center; gap: 6px; min-height: 40px; }
.sheet-head strong { flex: 1; min-width: 0; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acts { display: flex; align-items: center; gap: 0; }
.acts .btn.ok { margin-left: 6px; }

.tools { display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); gap: 8px; }
.tools-head { display: grid; gap: 2px; margin-bottom: -4px; }
.tools-head strong { font-size: 15px; }
.tools-head span { font-size: 13px; color: var(--muted); }
.tools.adding .tool-ic { position: relative; }
.tools.adding .tool-ic::after {
  content: "+"; position: absolute; right: -5px; top: -5px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 14px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px #fff;
}
.tool { display: grid; justify-items: center; gap: 6px; padding: 6px 2px; border-radius: 14px; font-size: 12.5px; font-weight: 600; min-height: 76px; }
.tool-ic { width: 50px; height: 50px; border-radius: 16px; background: var(--soft); display: grid; place-items: center; transition: background .15s; }

.note { display: flex; gap: 8px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.35; }
.note > span:first-child { flex: none; }
.note svg { width: 17px; height: 17px; margin-top: 1px; }
.hint { margin: 0; color: var(--muted); font-size: 12.5px; }

.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; min-height: 38px; padding: 0 14px; border-radius: 999px; font-weight: 600; font-size: 13.5px; color: var(--muted); }
.tab[aria-selected="true"] { background: var(--primary); color: #fff; }
.tab-body { min-height: 108px; }
.stack { display: grid; gap: 12px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

textarea, .inp {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); padding: 11px 12px; border-radius: 12px;
  border: 1.5px solid var(--line); background: #fff; resize: none; display: block;
}
textarea:focus, .inp:focus { outline: none; border-color: var(--sel); }

.field { display: grid; gap: 4px; min-width: 0; }
.field-top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--muted); }
.field-top.solo { margin-bottom: -6px; }
.field-top output { color: var(--ink); font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; height: 32px; margin: 0; accent-color: var(--primary); background: none; -webkit-appearance: none; appearance: none; }
input[type="range"]::-webkit-slider-runnable-track { height: 5px; border-radius: 3px; background: #d5dce6; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9.5px; border-radius: 50%; background: #fff; border: 2px solid var(--primary); box-shadow: 0 1px 3px rgba(15, 23, 42, .25); }
input[type="range"]::-moz-range-track { height: 5px; border-radius: 3px; background: #d5dce6; }
input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--primary); }

.btn-row { display: flex; gap: 6px; }
.layers { margin-top: 6px; display: grid; gap: 8px; }
.name-block { display: grid; gap: 10px; padding: 10px 12px 12px; border-radius: 12px; background: var(--soft); }
.name-block .field-top.solo { margin-bottom: -2px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; min-height: 36px; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); }
.layers .field-top { margin-bottom: 2px; }
.layer-btns .btn { font-size: 13.5px; padding: 0 10px; }
.layer-btns .ic svg { width: 18px; height: 18px; }
.tg { flex: 1; min-height: 44px; border-radius: 12px; background: var(--soft); display: inline-grid; place-items: center; font-size: 16px; }
.tg.ch { font-family: Georgia, "Times New Roman", serif; font-size: 18px; }
.tg[aria-pressed="true"] { background: var(--primary); color: #fff; }
.tg.txt { display: inline-flex; gap: 6px; padding: 0 10px; font-size: 13.5px; font-weight: 600; }
.tg.txt span { display: grid; }

.swatches { display: flex; gap: 10px; overflow-x: auto; padding: 5px 14px 7px; margin: 0 -14px; scrollbar-width: none; }
.swatches::-webkit-scrollbar { display: none; }
.sw { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .18); position: relative; }
.sw[aria-pressed="true"] { box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .18), 0 0 0 2px #fff, 0 0 0 4.5px var(--sel); }
.sw.custom { background: conic-gradient(#f43f5e, #f59e0b, #84cc16, #06b6d4, #6366f1, #d946ef, #f43f5e); overflow: hidden; cursor: pointer; border: 0; padding: 0; }
.sw.custom::after { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: var(--c, #fff); box-shadow: 0 0 0 2px #fff; }
.sw.custom[aria-expanded="true"] { box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .18), 0 0 0 2px #fff, 0 0 0 4.5px var(--sel); }
/* Curseurs C M J N (« Autre couleur ») */
.cmyk { display: grid; gap: 8px; padding: 10px 12px; margin-top: 6px; border-radius: 12px; background: var(--stage); }
.cmyk-row { display: grid; grid-template-columns: 22px 1fr 64px; align-items: center; gap: 10px; }
.cmyk-row.simple { grid-template-columns: 78px 1fr; padding-bottom: 2px; }
.cmyk-row.simple + .cmyk-row:not(.simple) { border-top: 1px solid var(--line); padding-top: 10px; }
.cmyk-lbl { font-size: 12.5px; color: var(--muted); }
.cmyk-row input.hue, .cmyk-row input.light { height: 28px; background: linear-gradient(90deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00) center / 100% 14px no-repeat; border-radius: 7px; }
.cmyk-row input.light { background-image: linear-gradient(90deg, hsl(var(--h, 200) 100% 10%), hsl(var(--h, 200) 100% 50%), hsl(var(--h, 200) 100% 95%)); }
.cmyk-row input.hue::-webkit-slider-runnable-track, .cmyk-row input.light::-webkit-slider-runnable-track { height: 14px; background: transparent; }
.cmyk-row input.hue::-webkit-slider-thumb, .cmyk-row input.light::-webkit-slider-thumb { margin-top: -5px; }
.cmyk-row input.hue::-moz-range-track, .cmyk-row input.light::-moz-range-track { height: 14px; background: transparent; }
.cmyk-row input[type="range"] { width: 100%; margin: 0; }
.cmyk-ch { font-weight: 700; font-size: 13px; text-align: center; border-radius: 6px; padding: 2px 0; color: #fff; }
.cmyk-ch.c { background: #00aeef; } .cmyk-ch.m { background: #ec008c; } .cmyk-ch.y { background: #fff200; color: #333; } .cmyk-ch.k { background: #231f20; }
.cmyk-num { padding: 4px 6px; text-align: center; min-height: 32px; }
.cmyk-prev { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.cmyk-prev::before { content: ''; width: 30px; height: 30px; border-radius: 8px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .18); }

.fonts { display: flex; gap: 8px; overflow-x: auto; padding: 2px 14px 8px; margin: 0 -14px; scrollbar-width: none; }
.fonts::-webkit-scrollbar { display: none; }
.font { flex: none; min-height: 52px; padding: 0 16px; border-radius: 14px; background: var(--soft); font-size: 19px; white-space: nowrap; border: 2px solid transparent; }
.font[aria-pressed="true"] { border-color: var(--primary); background: #fff; }

.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: 96px; gap: 8px; overflow-x: auto; padding: 4px 14px 8px; margin: 0 -14px; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.bg-cats { margin-bottom: -2px; }
.bg-cats .tab { min-height: 32px; padding: 0 12px; font-size: 13px; }
.bgt { aspect-ratio: 242 / 153; border-radius: 8px; background: var(--soft) center / cover; box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .14); font-size: 12.5px; font-weight: 600; color: var(--muted); }
.bgt[aria-pressed="true"] { box-shadow: 0 0 0 2px #fff, 0 0 0 4.5px var(--sel); }

.vrow { display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 12px; border-radius: 14px; background: var(--soft); }
.vrow-main { flex: 1; min-width: 0; min-height: 48px; display: grid; text-align: left; align-content: center; }
.vrow-main:disabled { opacity: 1; }
.vrow-main span { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.switch { -webkit-appearance: none; appearance: none; flex: none; width: 50px; height: 30px; margin: 7px; border-radius: 999px; background: #cbd5e1; position: relative; cursor: pointer; transition: background .15s; }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .3); transition: transform .15s; }
.switch:checked { background: var(--ok); }
.switch:checked::after { transform: translateX(20px); }

/* ---------- Fenêtres ---------- */
.dlg { border: 0; padding: 0; border-radius: 22px; width: min(92vw, 420px); max-height: 88dvh; color: var(--ink); box-shadow: 0 30px 80px rgba(15, 23, 42, .35); }
.dlg::backdrop { background: rgba(15, 23, 42, .45); }
.dlg-in { padding: 22px 20px 18px; display: grid; gap: 12px; position: relative; }
.dlg.has-x .dlg-in { padding-top: 26px; }
.dlg.has-x h2 { padding-right: 36px; }
.dlg-x { position: absolute; top: 10px; right: 10px; color: var(--muted); }
.add-dlg .tools { gap: 4px; margin: 2px 0 4px; }

/* Import depuis un site */
.site { display: grid; gap: 10px; }
.site-row { display: flex; gap: 8px; }
.site-row .inp { flex: 1; min-width: 0; }
.site-row .btn { flex: none; }
.site-status { min-height: 1.2em; }
.site-status.busy::before { content: ''; display: inline-block; width: 12px; height: 12px; margin: 0 6px -2px 0; border: 2px solid var(--primary); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.site-item { display: grid; gap: 4px; padding: 6px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font: inherit; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; }
.site-item img { width: 100%; height: 76px; object-fit: contain; border-radius: 8px; background: #e9eef4 repeating-conic-gradient(#fff 0 25%, transparent 0 50%) 0 0 / 14px 14px; }
.site-item.added { border-color: var(--primary); color: var(--primary); }
.site-item.bad { opacity: .5; cursor: default; }
.val-ref { margin: 0; font-weight: 700; font-size: 14px; }
/* Bouton bleu VKARD (« .brand » est déjà pris par le mot-marque de l'écran de choix). */
.btn.blue { background: var(--brand); color: #fff; text-decoration: none; letter-spacing: normal; box-shadow: 0 1px 3px rgba(65, 153, 213, .35); }
.btn.blue:hover { background: var(--brand-dark); color: #fff; }
.btn.blue svg { width: 20px; height: 20px; }
.val-ok .link { margin-top: 2px; }
.val-ok .btn.big { margin-top: 6px; }
.site-dlg.dlg { width: min(92vw, 560px); }
.site-dlg .dlg-in { overflow: auto; max-height: 88dvh; box-sizing: border-box; }
.dlg h2 { margin: 0; font-size: 19px; line-height: 1.2; text-wrap: balance; }
.dlg p { margin: 0; color: var(--muted); }
.dlg-foot { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 6px; }
.dlg-foot .btn { flex: 1; }
.dlg-foot .link.full { flex-basis: 100%; text-align: center; background: none; border: 0; cursor: pointer; margin-top: -2px; }
.val-dlg { width: min(94vw, 520px); }
.val-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px; border-radius: 16px; background: var(--stage); }
.val-cards figure { margin: 0; display: grid; gap: 6px; }
.val-cards figcaption { text-align: center; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.mini-card { border-radius: 3.71% / 5.88%; box-shadow: 0 1px 1px rgba(15, 23, 42, .12), 0 8px 14px -6px rgba(15, 23, 42, .32); }
.mini-card svg { display: block; width: 100%; border-radius: inherit; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checks li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.checks li > span:nth-child(2) { flex: 1; }
.ck { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #dcfce7; color: var(--ok); }
.ck svg { width: 16px; height: 16px; }
.warn .ck, .block .ck { background: #fef3c7; color: var(--warn); }
.vars { display: grid; gap: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.vars h3 { margin: 0; font-size: 15px; }
.val-ok { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 14px 0 4px; }
.val-ok h3 { margin: 0; font-size: 20px; }
.big-ck { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: #dcfce7; color: var(--ok); }
.big-ck svg { width: 34px; height: 34px; }
/* Attente de l'enregistrement : sablier orange qui se retourne. */
.big-ck.wait { background: #ffedd5; color: #ea580c; }
.big-ck.wait svg { animation: vk-hourglass 1.6s ease-in-out infinite; }
@keyframes vk-hourglass { 0%, 40% { transform: rotate(0); } 60%, 100% { transform: rotate(180deg); } }
@media (prefers-reduced-motion: reduce) { .big-ck.wait svg { animation: none; } }

/* ---------- Grand écran : panneau à droite ---------- */
@media (min-width: 900px) {
  #editor { display: grid; grid-template-columns: 1fr 400px; grid-template-rows: auto 1fr; }
  .topbar { grid-column: 1 / -1; padding: 8px 16px 8px 8px; }
  .stage { padding: 32px; gap: 22px; }
  .panel { max-height: none; border-radius: 0; box-shadow: none; border-left: 1px solid var(--line); padding: 20px; }
  .mat-list { max-width: 980px; grid-template-columns: repeat(3, 1fr); align-items: start; }
  .my-designs { max-width: 980px; }
  .my-designs ul { grid-template-columns: 1fr; }
  /* En large : vignettes côte à côte même pour une carte horizontale, infos et boutons sur une seule ligne. */
  .my-designs li { grid-template-columns: auto 1fr auto; }
  .my-thumbs.my-stack { flex-direction: row; }
  .my-thumb { width: 110px; }
  .my-designs img.my-thumb { width: 110px; height: 69.5px; }
  .my-acts { grid-column: auto; flex-wrap: nowrap; }
  .mat-main { grid-template-columns: 1fr auto; }
  .mat-stage { grid-column: 1 / -1; }
  .pick-head { max-width: 980px; padding-top: 40px; }
  /* Le panneau a de la place : les listes passent à la ligne au lieu de défiler. */
  .tabs, .swatches, .fonts { flex-wrap: wrap; overflow: visible; margin: 0; padding-left: 0; padding-right: 0; }
  .swatches { padding: 4px 0; }
  .fonts { padding: 2px 0 4px; }
  .gallery { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); grid-auto-columns: auto; overflow: visible; margin: 0; padding: 2px 0 4px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

.vrow-go { flex: none; width: 44px; height: 44px; display: grid; place-items: center; color: var(--muted); transform: rotate(90deg); pointer-events: none; }
.btn-row.wide .tg { min-width: 0; }
.val { display: grid; gap: 14px; }
.checks li { line-height: 1.3; }

/* ---------- Mise en situation ---------- */
.mock-dlg { width: min(96vw, 900px); }
.mock { position: relative; width: 100%; overflow: hidden; border-radius: 14px; background: #eee; --k: 1; }
.mock > img { display: block; width: 100%; height: auto; }
.mock-layer { position: absolute; inset: 0; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.mock-scale { position: absolute; left: 0; top: 0; transform: scale(var(--k)); transform-origin: 0 0; }
.mock-card { position: absolute; left: 0; top: 0; transform-origin: 0 0; overflow: hidden; }
.mock-card svg { display: block; width: 100%; height: 100%; }
.mock-shade { position: absolute; inset: 0; width: 100%; height: 100%; mix-blend-mode: hard-light; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; pointer-events: none; }
.mock-card .gloss { position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255,255,255,.12) 0%, rgba(255,255,255,0) 45%, rgba(0,0,0,.12) 100%); pointer-events: none; }
.val-mock { margin-top: 4px; }
.hint.err { color: var(--danger); }
/* Cartouche sous les vignettes de la vérification : le design sera revu par les graphistes. */
.team-check { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; padding: 10px 14px; border-radius: 12px; background: #eaf4fb; border: 1px solid #cfe5f5; color: var(--brand-dark); font-size: 13.5px; font-weight: 600; line-height: 1.4; }
.team-check .tc-ic { flex: none; display: grid; }
.team-check .tc-ic svg { width: 18px; height: 18px; }
.big-ck.fail { background: #fef2f2; color: var(--danger); }
.pill-row { display: flex; align-items: center; gap: 8px; }
.pill { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; color: #fff; }
.pill.ok { background: #16a34a; }
.pill.bad { background: var(--danger); }
/* Aide (haut gauche de la scène, face aux outils) : commander sans le configurateur. */
.help-btn { position: absolute; left: 12px; top: 10px; z-index: 2; color: var(--brand-dark); min-height: 46px; padding: 0 18px; font-size: 15.5px; gap: 8px; }
.help-btn svg { width: 23px; height: 23px; }
.help-dlg p { margin: 0 0 16px; color: var(--muted); line-height: 1.5; }
.help-dlg .btn.full { width: 100%; text-decoration: none; text-transform: uppercase; letter-spacing: .04em; }
.help-dlg .dlg-foot:empty { display: none; }
/* Plusieurs personnes : question à la création, barre sous la carte, bloc du verso, tableau. */
.pack-opts { display: grid; gap: 10px; }
.pack-opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px; border: 2px solid var(--line, #e2e8f0); border-radius: 14px; background: #fff; }
.pack-opt.on { border-color: var(--ink); }
.pack-opt .mat-radio { flex: none; }
.pack-txt { display: grid; gap: 2px; }
.pack-txt strong { font-size: 15px; }
.pp-stepper { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 14px 0; }
.pp-step { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 22px; font-weight: 600; color: var(--ink); cursor: pointer; }
.pp-step:disabled { opacity: .35; cursor: default; }
.pp-n { width: 80px; height: 44px; padding: 0; text-align: center; font-size: 22px; font-weight: 700; -moz-appearance: textfield; appearance: textfield; }
.pp-n::-webkit-inner-spin-button, .pp-n::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; } /* sans flèches : chiffre centré */
.pp-stepper.sm { margin: 0; gap: 6px; }
.pp-stepper.sm .pp-step { width: 32px; height: 32px; font-size: 18px; border-radius: 9px; }
.pp-num { min-width: 22px; text-align: center; font-weight: 700; }
.people-bar { flex: none; margin-top: 46px; margin-bottom: -4px; display: inline-flex; align-items: center; gap: 4px; padding: 3px; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .16); position: relative; z-index: 1; max-width: 100%; }
.people-bar[hidden] { display: none; }
.pp-nav { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--soft); font-size: 20px; line-height: 1; color: var(--ink); cursor: pointer; }
.pp-label { border: 0; background: none; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink); padding: 0 8px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }
.pp-add { align-self: flex-start; font-weight: 600; margin-bottom: 6px; }
.pp-block { display: grid; gap: 8px; padding: 12px; margin-bottom: 8px; border-radius: 12px; background: #eaf4fb; border: 1px solid #cfe5f5; }
.pp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pp-cur { margin: 0; }
.pp-per { margin-top: 4px; }
.dlg.pp-list-dlg { width: min(96vw, 860px); }
.pp-list-dlg .dlg-in > * { min-width: 0; } /* le tableau défile dans la fenêtre, sans l'élargir */
.pp-table { display: grid; gap: 6px; max-height: 55vh; overflow: auto; margin: 10px 0; overscroll-behavior: contain; }
.pp-cards { gap: 10px; max-height: 60dvh; }
.pp-card { display: grid; gap: 8px; padding: 10px 12px 12px; border-radius: 12px; background: var(--soft); }
.pp-card.cur { box-shadow: inset 0 0 0 2px #cfe5f5; }
.pp-card-head { display: flex; align-items: center; justify-content: space-between; font-size: 14px; }
.pp-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pp-fields .inp { min-width: 0; width: 100%; padding: 9px 10px; }
.pp-fields .inp:nth-child(n+3) { grid-column: 1 / -1; } /* prénom et nom côte à côte, le reste sur toute la largeur */
.pp-row { display: grid; gap: 6px; align-items: center; min-width: max-content; }
.pp-row .inp { min-width: 0; width: 100%; padding: 8px 10px; }
.pp-row.cur .pp-i { color: var(--brand-dark); }
.pp-th { font-size: 12.5px; font-weight: 600; color: var(--muted); position: sticky; top: 0; background: #fff; z-index: 1; padding-bottom: 2px; }
.pp-i { text-align: center; font-weight: 700; color: var(--muted); font-size: 13px; }
.pp-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.my-designs li.sel-off { opacity: .55; }
.my-designs li.sel-off .sel-why { color: var(--warn); font-weight: 600; }
.my-pick-hint { margin: -4px 0 8px; font-weight: 600; color: var(--brand-dark); }
.pp-navrow { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 3px; border-radius: 999px; background: #fff; }
.pp-navrow .pp-label { cursor: default; text-align: center; flex: 1; }
@media (max-width: 899px) { .people-bar { display: none !important; } }
/* Mobile : la carte commence sous les boutons flottants (Aide, outils) même quand la scène est basse. */
/* Mobile : la scène a une hauteur fixe, calculée sur la largeur de la carte (boutons du haut + carte + Recto/Verso),
   la même au recto et au verso, sur téléphone comme dans une fenêtre étroite d'ordinateur. Le panneau prend le reste
   et défile ; sur un écran bas, la scène est plafonnée et la carte rapetisse un peu. */
@media (max-width: 899px) {
  .stage { flex: none; padding-top: 64px; height: min(calc(64px + min(100vw - 32px, 600px) / 1.5833 + 16px + 60px + 14px), 58dvh); }
  .panel { flex: 1 1 auto; min-height: 0; max-height: none; }
}
@media (min-width: 900px) { .pp-navrow { display: none; } }
.pp-switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 600; cursor: pointer; }
.pp-switch .switch { margin: 0; }
.pp-cur-val { margin: 0; font-weight: 600; }
/* Fenêtre du design enregistré (et des autres étapes de la validation) : les boutons du bas restent visibles,
   la mise en situation rapetisse sur les écrans bas, et pas de contour de focus autour de la fenêtre. */
.dlg:focus { outline: none; }
.val-dlg .dlg-foot { position: sticky; bottom: 0; z-index: 1; background: #fff; margin: 0 -20px; padding: 10px 20px 12px; box-shadow: 0 -8px 12px -10px rgba(15, 23, 42, .25); }
.val-ok ~ .val-mock { width: min(100%, 38dvh); justify-self: center; margin-inline: auto; }
/* Confirmation courte (centrage…) : pastille verte en haut, disparaît seule. */
.toast { position: fixed; left: 50%; top: 72px; z-index: 1000; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px 9px 12px;
  border-radius: 999px; background: #16a34a; color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 6px 18px rgba(15, 23, 42, .22);
  pointer-events: none; opacity: 0; transform: translate(-50%, -8px); transition: opacity .18s, transform .18s; white-space: nowrap; max-width: calc(100vw - 32px); }
.toast.warn { background: #b45309; white-space: normal; border-radius: 14px; width: max-content; max-width: min(440px, calc(100vw - 32px)); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 18px; height: 18px; flex: none; }
/* Vérification à plusieurs personnes : carrousel horizontal des cartes ; chaque carte fait un peu moins de la moitié
   de la largeur, la suivante dépasse à droite pour inviter à faire défiler. */
.val-carousel-wrap { display: grid; gap: 6px; min-width: 0; }
.val-carousel { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 14px; padding: 14px; border-radius: 16px; background: var(--stage); overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.val-carousel figure { flex: 0 0 42%; margin: 0; display: grid; gap: 6px; align-content: start; scroll-snap-align: start; min-width: 0; }
.val-carousel figcaption { text-align: center; font-size: 12.5px; font-weight: 600; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.val-carousel figure.bad figcaption { color: var(--danger); white-space: normal; }
.pp-scroll { text-align: center; margin: 0; }
.draft-body, .draft-form { display: grid; gap: 12px; }
.draft-form .err { margin: -4px 0 0; color: var(--danger); font-size: 13.5px; }
.draft-form .btn.full { width: 100%; }
.draft-form .link.full { background: none; border: 0; cursor: pointer; color: var(--muted); text-decoration: underline; padding: 4px; }
.draft-form .hint { font-size: 12.5px; text-align: center; }
.car-arrow { width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--soft); color: var(--ink); font-size: 17px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0 0 2px; flex: none; }
.car-arrow:not(:disabled):hover { background: #e2e8f0; }
.car-arrow:disabled { opacity: .35; cursor: default; }
.pp-scroll.mouse { display: none; align-items: center; justify-content: center; gap: 10px; }
@media (hover: hover) and (pointer: fine) {
  .pp-scroll.touch { display: none; }
  .pp-scroll.mouse { display: flex; }
}
.val > * { min-width: 0; }
/* Progression de l'envoi du design (validation) */
.val-prog { width: min(260px, 80%); height: 6px; margin: 10px auto 4px; border-radius: 3px; background: var(--soft, #eef2f6); overflow: hidden; }
.val-prog i { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 3px; transition: width .2s; }
