/*
 * « Mon équipe Pokémon » — NOUVEAUX composants (à livrer).
 * Préfixe .pkt- pour ne jamais entrer en conflit avec Flatsome / WooCommerce.
 * Tokens = couleurs réellement relevées sur les boutiques ; seules exceptions :
 *  --pkt-price  #1A7A43 (le vert #27AE60 du site fait 2,5:1 sur #EEE → illisible AA)
 *  --pkt-muted  #5A6F9B (le #8A97B5 du panier fait 2,9:1 → réservé au décoratif)
 * Mobile first : la base vise 360–430 px, puis 768 (tablette) et 1024+ (desktop).
 */
:root {
  --pkt-navy: #133270;          /* primaire Flatsome + panier */
  --pkt-navy-hover: #0d2657;
  --pkt-blue: #3559b9;          /* focus / sélection, checkout */
  --pkt-blue-soft: #f0f5ff;
  --pkt-yellow: #fdcc1e;        /* header */
  --pkt-yellow-soft: #fff5d6;   /* fond vignette panier */
  --pkt-orange: #e95515;        /* badge promo */
  --pkt-price: #1a7a43;
  --pkt-alert: #b20000;         /* --fs-color-alert */
  --pkt-alert-soft: #fdecec;
  --pkt-warn: #8a5a00;
  --pkt-warn-soft: #fff6e0;
  --pkt-ok-soft: #eaf6ee;
  --pkt-ink: #222222;           /* titres cartes */
  --pkt-ink-2: #133270;
  --pkt-muted: #5a6f9b;
  --pkt-line: #dfe3ec;
  --pkt-line-strong: #c9d1e3;
  --pkt-card-foot: #eeeeee;
  --pkt-surface: #ffffff;
  --pkt-radius-s: 8px;
  --pkt-radius: 12px;           /* cartes produit, CTA panier */
  --pkt-radius-l: 16px;
  --pkt-pill: 99px;             /* boutons / selects Flatsome */
  --pkt-shadow: 0 6px 14px rgba(0,0,0,.08);
  --pkt-shadow-up: 0 -6px 20px rgba(19,50,112,.10);
  --pkt-focus: 0 0 0 3px rgba(53,89,185,.45);
  --pkt-tap: 44px;
  --pkt-gutter: 16px;
  --pkt-dur: 180ms;
  --pkt-ease: cubic-bezier(.2,.8,.2,1);
  /* Décalage bas fourni par l'intégration quand un bandeau fixe existe (cookies, chat…). */
  --pkt-bottom-offset: 0px;
  --pkt-tray-h: 0px;
}
.pkt-vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.pkt :focus-visible, .pkt-focusable:focus-visible { outline: 2px solid var(--pkt-blue); outline-offset: 2px; box-shadow: var(--pkt-focus); }
.pkt { color: var(--pkt-ink); font-family: Poppins, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 15px; line-height: 1.5; text-align: left; }
/* Neutralisation limitée aux composants ajoutés ; aucun reset du thème. */
.pkt, .pkt *, .pkt *::before, .pkt *::after { box-sizing: border-box; }
.pkt :where(button, input, select) { font: inherit; margin: 0; letter-spacing: normal; text-transform: none; box-shadow: none; }
.pkt :where(button) { height: auto; line-height: normal; }
.pkt :where(a) { text-decoration: none; }
.pkt :where(ul, li, fieldset) { margin-left: 0; }
.pkt :where(img) { max-width: 100%; }
.pkt :where(h1, h2, h3, h4) { font-family: inherit; letter-spacing: normal; text-transform: none; }
.tbx-team-home.pkt-home { width: 100%; max-width: 1230px; margin-inline: auto; padding-inline: 15px; }
#tbx-team-builder { width: 100%; max-width: 1230px; margin: 0 auto; padding-inline: 15px; }
.tbx-team-product, .tbx-team-companions { clear: both; width: 100%; }
.pkt[hidden], .pkt [hidden] { display: none !important; }

/* ---------------------------------------------------------------- Boutons */
.pkt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--pkt-tap); padding: 8px 18px;
  border-radius: var(--pkt-radius); border: 2px solid transparent; font-weight: 700; font-size: 15px; line-height: 1.2; text-align: center;
  cursor: pointer; text-decoration: none; transition: background var(--pkt-dur), border-color var(--pkt-dur), color var(--pkt-dur), transform var(--pkt-dur);
  -webkit-tap-highlight-color: transparent; overflow-wrap: anywhere;
}
.pkt-btn svg { width: 20px; height: 20px; flex: none; }
.pkt-btn--primary { background: var(--pkt-navy); color: #fff; }
.pkt-btn--primary:hover { background: var(--pkt-navy-hover); }
.pkt-btn--secondary { background: #fff; color: var(--pkt-navy); border-color: var(--pkt-navy); }
.pkt-btn--secondary:hover { background: var(--pkt-blue-soft); }
.pkt-btn--ghost { background: transparent; color: var(--pkt-navy); padding-inline: 10px; }
.pkt-btn--ghost:hover { background: rgba(19,50,112,.06); }
.pkt-btn--danger-ghost { background: transparent; color: var(--pkt-alert); padding-inline: 10px; }
.pkt-btn--pill { border-radius: var(--pkt-pill); text-transform: uppercase; letter-spacing: .03em; font-size: 14px; }
.pkt-btn--block { width: 100%; }
.pkt-btn--lg { min-height: 52px; font-size: 16px; font-weight: 800; }
.pkt-btn[aria-disabled="true"] { background: #e7eaf1; color: var(--pkt-muted); border-color: transparent; cursor: default; }
.pkt-btn.is-busy, .pkt-btn.is-busy[aria-disabled="true"] { cursor: progress; background: var(--pkt-navy); color: #fff; opacity: .88; }
.pkt-btn--secondary.is-busy { background: #fff; color: var(--pkt-navy); }
.pkt-btn:active:not([aria-disabled="true"]) { transform: scale(.98); }
.pkt-spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: pkt-spin .7s linear infinite; flex: none; }
@keyframes pkt-spin { to { transform: rotate(360deg); } }

.pkt-iconbtn { width: var(--pkt-tap); height: var(--pkt-tap); display: inline-grid; place-items: center; border-radius: var(--pkt-pill); border: 0; background: transparent; color: var(--pkt-navy); cursor: pointer; flex: none; }
.pkt-iconbtn:hover { background: rgba(19,50,112,.07); }
.pkt-iconbtn svg { width: 22px; height: 22px; }
.pkt-link { color: var(--pkt-navy); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; padding: 0; cursor: pointer; font-size: inherit; min-height: 32px; }

/* ---------------------------------------------------------------- Images */
.pkt-img { position: relative; display: block; overflow: hidden; background: #fff; aspect-ratio: 1; }
.pkt-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pkt-img--missing { background: var(--pkt-yellow-soft); display: grid; place-items: center; color: #b99a3a; }
.pkt-img--missing svg { width: 42%; height: 42%; }

/* ---------------------------------------------------------------- Emplacements d'équipe */
.pkt-team { background: #fff; border-radius: var(--pkt-radius); box-shadow: var(--pkt-shadow); padding: 14px; }
.pkt-team__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.pkt-team__title { font-size: 15px; font-weight: 800; color: var(--pkt-navy); margin: 0; }
.pkt-team__count { font-size: 13px; color: var(--pkt-muted); font-weight: 500; }
.pkt-slots { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; list-style: none; margin: 0; padding: 0; }
.pkt-slot {
  position: relative; width: 100%; aspect-ratio: 1; border-radius: var(--pkt-radius); border: 2px dashed var(--pkt-line-strong);
  background: #fafbfd; display: grid; place-items: center; padding: 0; cursor: pointer; color: var(--pkt-muted); transition: border-color var(--pkt-dur), background var(--pkt-dur);
  min-width: 44px; min-height: 44px;
}
.pkt-slot:hover { border-color: var(--pkt-blue); background: var(--pkt-blue-soft); }
.pkt-slot__plus { width: 40%; height: 40%; max-width: 22px; max-height: 22px; }
.pkt-slot--filled { border: 2px solid transparent; background: var(--pkt-yellow-soft); overflow: hidden; }
.pkt-slot--filled:hover { border-color: var(--pkt-navy); background: var(--pkt-yellow-soft); }
.pkt-slot--filled img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; }
.pkt-slot--pop { animation: pkt-pop 260ms var(--pkt-ease); }
@keyframes pkt-pop { 0% { transform: scale(.82); } 60% { transform: scale(1.05); } 100% { transform: scale(1); } }
.pkt-slot--target { border: 2px solid var(--pkt-blue); box-shadow: var(--pkt-focus); }
.pkt-slot__dup { position: absolute; top: 3px; right: 3px; min-width: 20px; height: 18px; padding: 0 5px; border-radius: var(--pkt-pill); background: var(--pkt-navy); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; line-height: 1; }
.pkt-slot__issue { position: absolute; left: 3px; bottom: 3px; width: 18px; height: 18px; border-radius: 99px; background: var(--pkt-orange); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.pkt-slot--unavailable img { filter: grayscale(1); opacity: .45; }
.pkt-slot--incart::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.55); }
.pkt-slot__name { display: none; }
.pkt-team__status { margin: 10px 0 0; font-size: 13px; color: var(--pkt-muted); min-height: 1.5em; }
.pkt-team__issues { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.pkt-team__issues li { font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 0 8px; align-items: flex-start; line-height: 1.4; }
.pkt-team__issues li > span:nth-child(2) { flex: 1 1 calc(100% - 26px); }
.pkt-team__issues li > .pkt-btn { margin-left: 18px; margin-right: -8px; }

/* ---------------------------------------------------------------- Alertes */
.pkt-alert { display: flex; gap: 10px; align-items: flex-start; border-radius: var(--pkt-radius); padding: 12px 14px; font-size: 13.5px; line-height: 1.45; border: 1px solid; }
.pkt-alert svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.pkt-alert--info { background: var(--pkt-blue-soft); border-color: #c9d6f5; color: var(--pkt-navy); }
.pkt-alert--warn { background: var(--pkt-warn-soft); border-color: #f1d08a; color: #5c3d00; }
.pkt-alert--error { background: var(--pkt-alert-soft); border-color: #f1b0b0; color: #7d0b0b; }
.pkt-alert--ok { background: var(--pkt-ok-soft); border-color: #b9dfc6; color: #145c33; }
.pkt-alert__body { flex: 1; min-width: 0; }
.pkt-alert__actions { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; }

/* ---------------------------------------------------------------- Carte produit du créateur */
.pkt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; }
@media (min-width: 550px) { .pkt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
.pkt-card { position: relative; min-width: 0; background: #fff; border-radius: var(--pkt-radius); box-shadow: var(--pkt-shadow); overflow: hidden; display: flex; flex-direction: column; height: 100%; outline: 2px solid transparent; outline-offset: -2px; transition: outline-color var(--pkt-dur), box-shadow var(--pkt-dur); }
.pkt-card.is-selected { outline-color: var(--pkt-navy); }
.pkt-card__media { display: block; width: 100%; min-width: 0; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; }
.pkt-card__badges { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; flex-wrap: wrap; gap: 4px; pointer-events: none; }
.pkt-badge { display: inline-flex; align-items: center; gap: 4px; min-height: 22px; padding: 2px 8px; border-radius: var(--pkt-pill); font-size: 11px; font-weight: 700; line-height: 1.2; }
.pkt-badge svg { width: 12px; height: 12px; }
.pkt-badge--team { background: var(--pkt-navy); color: #fff; }
.pkt-badge--oos { background: #fff; color: #555; border: 1px solid #ddd; }
.pkt-badge--reason { background: var(--pkt-yellow); color: var(--pkt-navy); }
.pkt-card__foot { background: var(--pkt-card-foot); padding: 10px 10px 10px 12px; min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.pkt-card__name { min-width: 0; width: 100%; flex: none; font-weight: 600; color: var(--pkt-ink); font-size: .9rem; line-height: 1.35; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; min-height: 2.7em; max-height: 2.7em; }
/* Le prix et l'action restent entiers : aux petites largeurs, Choisir passe dessous. */
.pkt-card__buy { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; margin-top: auto; }
.pkt-card__price { min-width: 0; max-width: 100%; flex: 0 0 auto; color: var(--pkt-price); font-weight: 700; font-size: .9rem; white-space: nowrap; }
.pkt-card__price small { font-weight: 500; font-size: .75rem; color: var(--pkt-muted); display: block; }
.pkt-card__opt { font-size: 11.5px; color: var(--pkt-muted); grid-column: 1 / -1; }
.pkt .pkt-add { flex: none; width: var(--pkt-tap); min-width: var(--pkt-tap); height: var(--pkt-tap); min-height: var(--pkt-tap); margin: 0 0 0 auto; padding: 0; border-radius: var(--pkt-pill); border: 0; background: var(--pkt-navy); color: #fff; display: grid; place-items: center; line-height: 1.2; text-align: center; cursor: pointer; transition: background var(--pkt-dur), transform var(--pkt-dur); }
.pkt-add svg { width: 22px; height: 22px; }
.pkt .pkt-add:hover { background: var(--pkt-navy-hover); }
.pkt .pkt-add:focus-visible { outline: 2px solid var(--pkt-blue); outline-offset: 2px; box-shadow: var(--pkt-focus); }
.pkt .pkt-add:active:not(:disabled):not([aria-disabled="true"]) { transform: scale(.94); }
.pkt .pkt-add:disabled, .pkt .pkt-add[aria-disabled="true"] { background: #e7eaf1; color: var(--pkt-muted); cursor: default; }
.pkt .pkt-add--choose { width: auto; max-width: 100%; padding: 0 12px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.pkt-card.is-oos .pkt-img img { opacity: .5; filter: grayscale(.4); }
.pkt-card--compact { width: 150px; flex: none; }
.pkt-card--compact .pkt-card__name { font-size: .82rem; }
.pkt-card--skeleton .pkt-img, .pkt-card--skeleton .pkt-sk-line { background: linear-gradient(90deg, #eceef3 0%, #f6f7fa 40%, #eceef3 80%); background-size: 200% 100%; animation: pkt-shimmer 1.2s linear infinite; }
.pkt-sk-line { height: 12px; border-radius: 6px; margin: 4px 0; }
@keyframes pkt-shimmer { to { background-position: -200% 0; } }

/* ---------------------------------------------------------------- Barre d'outils créateur */
.pkt-tools { display: grid; gap: 10px; margin-bottom: 14px; }
.pkt-search { position: relative; }
#tbx-team-builder .pkt-search input[type="search"] {
  width: 100%; height: 48px; border-radius: var(--pkt-pill); border: 1px solid rgba(0,0,0,.16); background: #fff; padding: 0 48px 0 44px;
  font-size: 16px; /* ≥16px : évite le zoom iOS */ color: var(--pkt-ink); -webkit-appearance: none;
}
#tbx-team-builder .pkt-search input[type="search"]::placeholder { color: #6f7a90; }
#tbx-team-builder .pkt-search input[type="search"]:focus { outline: none; border-color: var(--pkt-blue); box-shadow: var(--pkt-focus); }
.pkt-search__icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--pkt-muted); pointer-events: none; }
.pkt-search__clear { position: absolute; right: 2px; top: 2px; }
.pkt-filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; scroll-snap-type: x proximity; }
.pkt-filters::-webkit-scrollbar { display: none; }
.pkt-chip {
  flex: none; min-height: var(--pkt-tap); padding: 0 16px; border-radius: var(--pkt-pill); border: 1px solid var(--pkt-line-strong); background: #fff; color: var(--pkt-navy);
  font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; scroll-snap-align: start; display: inline-flex; align-items: center; gap: 6px;
}
.pkt-chip[aria-pressed="true"] { background: var(--pkt-navy); color: #fff; border-color: var(--pkt-navy); }
.pkt-chip--select { position: relative; padding: 0; }
.pkt-chip--select select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; color: inherit; font: inherit; height: 42px; padding: 0 34px 0 16px; border-radius: var(--pkt-pill); cursor: pointer; }
.pkt-chip--select svg { position: absolute; right: 12px; width: 14px; height: 14px; pointer-events: none; }
.pkt-chip--select.is-active { background: var(--pkt-navy); color: #fff; border-color: var(--pkt-navy); }
.pkt-chip--select select option { color: #222; }
.pkt-resultbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--pkt-muted); min-height: 32px; }

/* ---------------------------------------------------------------- Idées (suggestions) */
.pkt-ideas { margin: 4px 0 18px; }
.pkt-ideas__title { font-size: 15px; font-weight: 800; color: var(--pkt-navy); margin: 0 0 10px; }
.pkt-ideas__row { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 12px; margin: -4px -2px 0; scroll-snap-type: x mandatory; list-style: none; }
.pkt-ideas__row > li { scroll-snap-align: start; display: flex; }

/* ---------------------------------------------------------------- États vides / erreur */
.pkt-empty { text-align: center; padding: 28px 16px; background: #fff; border-radius: var(--pkt-radius); box-shadow: var(--pkt-shadow); }
.pkt-empty p { margin: 0 0 12px; color: var(--pkt-ink); }
.pkt-empty__try { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--pkt-muted); align-items: center; }
.pkt-more { display: flex; justify-content: center; margin: 20px 0 8px; }

/* ---------------------------------------------------------------- Page créateur */
.pkt-builder { padding-block: 18px 0; }
.pkt-builder__head { margin-bottom: 12px; }
.pkt-builder__title { font-size: 21px; line-height: 1.25; color: var(--pkt-navy); font-weight: 800; margin: 0; }
.pkt-builder__hint { margin: 4px 0 0; font-size: 14px; color: var(--pkt-muted); font-weight: 500; }
.pkt-builder__layout { display: grid; gap: 16px; }
.pkt-builder__main { min-width: 0; }
.pkt-aside__summary { display: none; }
.pkt-banner { position: sticky; top: calc(var(--pkt-header-offset, 70px) + 6px); z-index: 12; margin-bottom: 12px; }
.pkt-builder__spacer { height: calc(var(--pkt-tray-h) + var(--pkt-bottom-offset) + 24px); }
.pkt-builder #b-notices:empty, .pkt-builder .pkt-team__issues:empty { display: none !important; }

@media (max-width: 767px) {
  .pkt-builder.is-empty .pkt-builder__layout { gap: 12px; }
  .pkt-builder.is-empty .pkt-team { padding: 10px; }
  .pkt-builder.is-empty .pkt-team__head { margin-bottom: 6px; }
  .pkt-builder.is-empty .pkt-slots { gap: 6px; }
  .pkt-builder.is-empty .pkt-team__status { margin-top: 6px; font-size: 12px; line-height: 1.4; }
}

@media (min-width: 768px) {
  .pkt-builder__layout { grid-template-columns: minmax(0, 1fr) 290px; align-items: start; gap: 24px; }
  .pkt-builder__aside { order: 2; position: sticky; top: calc(var(--pkt-header-offset, 70px) + 16px); }
  .pkt-builder__main { order: 1; }
  .pkt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pkt-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .pkt-slot__name { display: block; position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 4px 4px; font-size: 10.5px; font-weight: 600; color: var(--pkt-navy); background: linear-gradient(transparent, rgba(255,245,214,.95) 45%); line-height: 1.2; text-align: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .pkt-aside__summary { display: block; border-top: 1px solid var(--pkt-line); margin-top: 14px; padding-top: 14px; }
  .pkt-builder__title { font-size: 26px; }
  .pkt-builder__spacer { height: 32px; }
}
@media (min-width: 1024px) {
  .pkt-builder__layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; }
  .pkt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1280px) { .pkt-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Résumé (aside desktop et bac mobile) */
.pkt-sum__line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.pkt-sum__label { font-size: 14px; color: var(--pkt-navy); font-weight: 600; }
.pkt-sum__total { font-size: 20px; font-weight: 800; color: var(--pkt-price); white-space: nowrap; }
.pkt-sum__note { font-size: 12.5px; color: var(--pkt-muted); margin: 2px 0 12px; }
.pkt-sum__err { margin-top: 10px; }
.pkt-aside__summary .pkt-btn--lg { font-size: 15px; padding-inline: 12px; gap: 6px; }

/* ---------------------------------------------------------------- Bac mobile fixe */
.pkt-tray {
  position: fixed; left: 0; right: 0; bottom: var(--pkt-bottom-offset); z-index: 40; background: #fff; box-shadow: var(--pkt-shadow-up); border-top: 1px solid var(--pkt-line);
  padding: 8px var(--pkt-gutter) calc(10px + env(safe-area-inset-bottom)); transition: transform var(--pkt-dur) var(--pkt-ease);
}
.pkt-tray.is-hidden { transform: translateY(calc(100% + var(--pkt-bottom-offset))); }
.pkt-tray__row { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.pkt-tray__view { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: var(--pkt-navy); min-height: 44px; }
.pkt-mini { display: flex; flex: none; }
.pkt-mini span { width: 30px; height: 30px; border-radius: 99px; background: var(--pkt-yellow-soft); border: 2px solid #fff; margin-left: -8px; overflow: hidden; display: block; box-shadow: 0 0 0 1px var(--pkt-line); }
.pkt-mini span:first-child { margin-left: 0; }
.pkt-mini span.is-empty { background: #f1f3f8; }
.pkt-mini img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; display: block; }
.pkt-tray__text { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.pkt-tray__count { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pkt-tray__sub { font-size: 12px; color: var(--pkt-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Écrans étroits : on ne garde que les vignettes remplies pour laisser la place à « hors livraison ». */
@media (max-width: 399px) { .pkt-mini span.is-empty { display: none; } }
.pkt-tray__total { font-size: 17px; font-weight: 800; color: var(--pkt-price); white-space: nowrap; margin-left: auto; }
.pkt-tray .pkt-btn { margin-top: 6px; }
.pkt-tray__bump { animation: pkt-bump 300ms var(--pkt-ease); }
@keyframes pkt-bump { 50% { transform: scale(1.12); } }
@media (min-width: 768px) { .pkt-tray--builder { display: none; } }

/* ---------------------------------------------------------------- Feuille / dialogue (un seul niveau) */
.pkt-sheet-root { position: fixed; inset: 0; z-index: 100050; display: flex; align-items: flex-end; justify-content: center; }
.pkt-sheet-root[hidden] { display: none; }
.pkt-sheet__backdrop { position: absolute; inset: 0; background: rgba(10,20,45,.5); animation: pkt-fade var(--pkt-dur) both; }
.pkt-sheet {
  position: relative; width: 100%; max-height: min(92dvh, 92vh); background: #fff; border-radius: var(--pkt-radius-l) var(--pkt-radius-l) 0 0; display: flex; flex-direction: column;
  animation: pkt-up 240ms var(--pkt-ease) both; box-shadow: 0 -10px 40px rgba(0,0,0,.2); outline: none;
}
.pkt-sheet__grab { width: 40px; height: 4px; border-radius: 4px; background: var(--pkt-line-strong); margin: 8px auto 0; flex: none; }
.pkt-sheet__head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px var(--pkt-gutter); flex: none; }
.pkt-sheet__title { flex: 1; font-size: 16px; font-weight: 800; color: var(--pkt-navy); margin: 0; line-height: 1.3; }
.pkt-sheet__body { overflow-y: auto; padding: 4px var(--pkt-gutter) 16px; overscroll-behavior: contain; flex: 1; }
.pkt-sheet__foot { flex: none; padding: 12px var(--pkt-gutter) calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--pkt-line); display: grid; gap: 8px; background: #fff; }
@keyframes pkt-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pkt-fade { from { opacity: 0; } to { opacity: 1; } }
@media (min-width: 768px) {
  .pkt-sheet-root { align-items: center; padding: 24px; }
  .pkt-sheet { max-width: 520px; border-radius: var(--pkt-radius-l); max-height: min(88vh, 860px); animation-name: pkt-zoom; }
  .pkt-sheet--wide { max-width: 860px; }
  .pkt-sheet__grab { display: none; }
  .pkt-sheet__head { padding-top: 10px; }
}
@keyframes pkt-zoom { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }

/* Détail rapide */
.pkt-qv { display: grid; gap: 14px; }
.pkt-qv__gallery { position: relative; }
.pkt-qv__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--pkt-radius); scrollbar-width: none; background: #fff; }
.pkt-qv__track::-webkit-scrollbar { display: none; }
.pkt-qv__track > .pkt-img { flex: 0 0 100%; scroll-snap-align: center; max-height: 38vh; aspect-ratio: auto; height: min(100vw - 32px, 38vh); }
.pkt-qv__track img { object-fit: contain; }
.pkt-qv__dots { display: flex; justify-content: center; gap: 2px; margin-top: 4px; }
.pkt-qv__dots button { width: 28px; height: 28px; border: 0; background: none; padding: 0; cursor: pointer; display: grid; place-items: center; }
.pkt-qv__dots button::before { content: ""; width: 8px; height: 8px; border-radius: 99px; background: var(--pkt-line-strong); }
.pkt-qv__dots button[aria-current="true"]::before { background: var(--pkt-navy); }
.pkt-qv__name { font-size: 18px; font-weight: 800; color: var(--pkt-ink); margin: 0; line-height: 1.3; }
.pkt-qv__price { font-size: 22px; font-weight: 800; color: var(--pkt-price); margin-top: 2px; }
.pkt-qv__meta { font-size: 13px; color: var(--pkt-muted); margin-top: 2px; }
.pkt-qv__bullets { margin: 0; padding-left: 18px; font-size: 13.5px; color: #444; font-weight: 400; display: grid; gap: 3px; }
.pkt-qv__state { font-size: 13px; color: var(--pkt-navy); font-weight: 600; display: flex; align-items: center; gap: 6px; }
@media (min-width: 768px) {
  .pkt-qv { grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
  .pkt-qv__track > .pkt-img { max-height: none; }
}

/* Options de variante : boutons radio en pastilles (plus clairs qu'un select au tactile) */
.pkt-options { border: 0; margin: 0; padding: 0; }
.pkt-options legend { font-size: 14px; font-weight: 700; color: var(--pkt-ink); margin-bottom: 8px; padding: 0; }
.pkt-options__list { display: flex; flex-wrap: wrap; gap: 8px; }
.pkt-opt { position: relative; }
.pkt-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pkt-opt span { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-height: var(--pkt-tap); padding: 4px 16px; border-radius: var(--pkt-pill); border: 1px solid var(--pkt-line-strong); background: #fff; font-size: 14px; font-weight: 600; color: var(--pkt-navy); line-height: 1.2; }
.pkt-opt span small { font-size: 11.5px; font-weight: 500; color: var(--pkt-muted); }
.pkt-opt input:checked + span { border: 2px solid var(--pkt-navy); background: var(--pkt-blue-soft); padding-inline: 15px; }
.pkt-opt input:focus-visible + span { box-shadow: var(--pkt-focus); }
.pkt-opt input:disabled + span { color: #9aa3b5; text-decoration: line-through; background: #f5f6f9; }
.pkt-options.is-invalid .pkt-opt span { border-color: var(--pkt-alert); }
.pkt-field-error { color: var(--pkt-alert); font-size: 13px; font-weight: 600; margin: 8px 0 0; display: flex; gap: 6px; align-items: center; }
.pkt-field-error svg, .pkt-qv__state svg { width: 18px; height: 18px; flex: none; }

/* Liste de résultat (succès / partiel / revue) */
.pkt-reslist { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.pkt-resitem { display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; align-items: center; padding: 6px; border-radius: var(--pkt-radius-s); }
.pkt-resitem .pkt-img { width: 48px; border-radius: 8px; background: var(--pkt-yellow-soft); }
.pkt-resitem .pkt-img img { mix-blend-mode: multiply; }
.pkt-resitem__name { font-size: 13.5px; font-weight: 600; color: var(--pkt-ink); line-height: 1.3; }
.pkt-resitem__sub { font-size: 12.5px; color: var(--pkt-muted); }
.pkt-resitem__sub--warn { color: var(--pkt-warn); font-weight: 600; }
.pkt-resitem__sub--err { color: var(--pkt-alert); font-weight: 600; }
.pkt-resitem__state { font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.pkt-resitem__state--ok { color: var(--pkt-price); }
.pkt-resitem__state--ko { color: var(--pkt-alert); }
.pkt-resitem__state svg { width: 16px; height: 16px; }
.pkt-check { width: 56px; height: 56px; border-radius: 99px; background: var(--pkt-ok-soft); color: var(--pkt-price); display: grid; place-items: center; margin: 4px 0 8px; }
.pkt-check svg { width: 30px; height: 30px; }

/* Choix de l'emplacement à remplacer */
.pkt-pick { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pkt-pick button { width: 100%; background: #fff; border: 2px solid var(--pkt-line); border-radius: var(--pkt-radius); padding: 6px; cursor: pointer; display: grid; gap: 4px; text-align: center; font-size: 12px; font-weight: 600; color: var(--pkt-navy); min-height: 44px; }
.pkt-pick button:hover { border-color: var(--pkt-navy); }
.pkt-pick .pkt-img { border-radius: 8px; background: var(--pkt-yellow-soft); }
.pkt-pick .pkt-img img { mix-blend-mode: multiply; }
.pkt-pick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- Toast / annonce */
.pkt-toasts { position: fixed; left: var(--pkt-gutter); right: var(--pkt-gutter); bottom: calc(var(--pkt-tray-h) + var(--pkt-bottom-offset) + 12px); z-index: 90; display: grid; justify-items: center; gap: 8px; pointer-events: none; }
.pkt-toast { pointer-events: auto; max-width: 480px; width: 100%; background: var(--pkt-navy); color: #fff; border-radius: var(--pkt-radius); padding: 10px 8px 10px 14px; display: flex; align-items: center; gap: 10px; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: pkt-up 220ms var(--pkt-ease) both; }
.pkt-toast__msg { flex: 1; min-width: 0; }
.pkt-toast .pkt-btn { color: var(--pkt-yellow); min-height: 40px; padding: 4px 10px; }
.pkt-toast .pkt-btn:hover { background: rgba(255,255,255,.08); }
@media (min-width: 768px) { .pkt-toasts { bottom: 24px; left: auto; right: 24px; width: 420px; } }

/* ---------------------------------------------------------------- Bloc home */
.pkt-home { margin: 20px 0 8px; }
.pkt-home__card { background: #fff; border-radius: var(--pkt-radius-l); box-shadow: 0 8px 24px rgba(19,50,112,.12); overflow: hidden; display: grid; }
.pkt-home__visual { background: var(--pkt-yellow); padding: 30px 16px 16px; position: relative; }
.pkt-home__slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; list-style: none; margin: 0; padding: 0; max-width: 290px; margin-inline: auto; }
.pkt-home__slot { aspect-ratio: 1; border-radius: var(--pkt-radius); background: #fff; position: relative; overflow: hidden; box-shadow: 0 3px 8px rgba(19,50,112,.12); }
.pkt-home__slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pkt-home__slot--empty { background: rgba(255,255,255,.35); border: 2px dashed rgba(19,50,112,.35); box-shadow: none; display: grid; place-items: center; color: var(--pkt-navy); }
.pkt-home__slot--empty svg { width: 26%; height: 26%; opacity: .7; }
.pkt-home__example { position: absolute; top: 8px; left: 0; right: 0; text-align: center; font-size: 11px; font-weight: 600; color: var(--pkt-navy); letter-spacing: .04em; text-transform: uppercase; }
.pkt-home__body { padding: 18px 18px 20px; text-align: center; }
.pkt-home__title { font-size: 21px; line-height: 1.25; color: var(--pkt-navy); font-weight: 800; margin: 0; }
.pkt-home__text { margin: 8px 0 16px; color: #444; font-weight: 400; font-size: 15px; }
.pkt-home__actions { display: grid; gap: 4px; justify-items: center; }
.pkt-home__resume { font-size: 13.5px; }
@media (min-width: 768px) {
  .pkt-home__card { grid-template-columns: 1.1fr 1fr; align-items: stretch; }
  .pkt-home__visual { padding: 28px; display: grid; place-items: center; }
  .pkt-home__slots { max-width: 420px; gap: 12px; }
  .pkt-home__body { text-align: left; padding: 32px 36px; align-self: center; }
  .pkt-home__actions { justify-items: start; }
  .pkt-home__title { font-size: 28px; }
}
@media (min-width: 1100px) {
  .pkt-home__slots { grid-template-columns: repeat(6, minmax(0, 1fr)); max-width: none; width: 100%; }
  .pkt-home__card { grid-template-columns: 1.35fr 1fr; }
}

/* ---------------------------------------------------------------- Entrée menu */
.pkt-navitem { color: var(--pkt-navy); }
.pkt-navitem__in { display: inline-flex; align-items: center; gap: 10px; }
.pkt-navitem__icon { width: 22px; height: 22px; flex: none; }
.pkt-navitem__count { font-size: 11px; font-weight: 700; text-transform: none; letter-spacing: 0; background: var(--pkt-yellow-soft); color: var(--pkt-navy); border-radius: var(--pkt-pill); padding: 2px 8px; white-space: nowrap; }

/* ---------------------------------------------------------------- Fiche produit */
.pkt-pdp { margin-top: 12px; }
.pkt-pdp .pkt-btn { width: 100%; }
.pkt-pdp > .pkt-btn--pill { text-transform: none; letter-spacing: 0; font-size: 15px; }
.pkt-pdp__icon { display: inline-grid; grid-template-columns: repeat(3, 6px); gap: 2px; flex: none; }
.pkt-pdp__icon i { width: 6px; height: 6px; border-radius: 2px; border: 1.5px solid currentColor; }
.pkt-pdp__icon i:nth-child(-n+2) { background: currentColor; }
.pkt-pdp__panel { margin-top: 10px; border: 1px solid var(--pkt-line); border-radius: var(--pkt-radius); padding: 14px; background: #fff; animation: pkt-fade var(--pkt-dur) both; }
.pkt-pdp__panel p { margin: 0 0 10px; color: var(--pkt-ink); font-size: 14px; font-weight: 500; }
.pkt-pdp__mini { display: flex; gap: 6px; margin-bottom: 12px; }
.pkt-pdp__mini span { width: 40px; height: 40px; border-radius: 10px; background: var(--pkt-yellow-soft); overflow: hidden; }
.pkt-pdp__mini span.is-empty { background: #f3f5f9; border: 1.5px dashed var(--pkt-line-strong); }
.pkt-pdp__mini img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; }
.pkt-pdp__actions { display: grid; gap: 8px; }
@media (min-width: 480px) { .pkt-pdp__actions { grid-template-columns: 1fr 1fr; } }

/* ---------------------------------------------------------------- Panier */
.pkt-cart-team { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 11px; font-weight: 600; color: var(--pkt-navy); background: var(--pkt-yellow-soft); border-radius: var(--pkt-pill); padding: 2px 8px; }
.pkt-cart-team svg { width: 12px; height: 12px; }
.pkt-companions { margin: 18px 0 6px; border: 1px solid var(--pkt-line); border-radius: var(--pkt-radius); padding: 12px; }
.pkt-companions__title { font-size: 14px; font-weight: 700; color: var(--pkt-navy); margin: 0 0 10px; }
.pkt-companions__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pkt-comp { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; }
.pkt-comp .pkt-img { width: 56px; border-radius: 10px; background: var(--pkt-yellow-soft); }
.pkt-comp .pkt-img img { mix-blend-mode: multiply; }
.pkt-comp__name { font-size: 13px; font-weight: 500; color: var(--pkt-navy); line-height: 1.3; }
.pkt-comp__meta { font-size: 12px; color: var(--pkt-muted); }
.pkt-comp__price { color: var(--pkt-price); font-weight: 700; font-size: 13px; }
.pkt-comp .pkt-btn { min-height: 44px; padding: 6px 14px; font-size: 13px; border-width: 1.5px; }
.pkt-comp__opts { grid-column: 1 / -1; padding: 4px 0 6px; }
.pkt-comp__opts .pkt-opt span { min-height: 44px; font-size: 13px; }
.pkt-comp__opts .pkt-options__list { margin-bottom: 8px; }
@media (min-width: 600px) {
  .pkt-companions__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .pkt-comp { grid-template-columns: 1fr; text-align: center; justify-items: center; gap: 6px; }
  .pkt-comp .pkt-img { width: 88px; }
  .pkt-comp__opts { grid-column: auto; }
}

/* ---------------------------------------------------------------- Mouvement réduit */
@media (prefers-reduced-motion: reduce) {
  .pkt *, .pkt *::before, .pkt *::after, .pkt-sheet, .pkt-sheet__backdrop, .pkt-toast { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}
