/* Feelloo – mini panier (v0.7.0) */
.fc-root {
  --fc-blue: #2f5196;
  --fc-yellow: #e5c13d;
  --fc-text: #1f2a44;
  --fc-muted: #6b7280;
  --fc-line: #e5e7eb;
  font-family: inherit;
  color: var(--fc-text);
}
.fc-root [hidden] { display: none !important; }
.fc-root button { font-family: inherit; }
html.fc-lock { overflow: hidden; }

/* Bouton panier flottant (provisoire : sera intégré au bandeau) */
.fc-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 99990;
  width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--fc-blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.fc-badge {
  position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 11px; background: var(--fc-yellow); color: var(--fc-blue);
  font-size: 13px; font-weight: 700; line-height: 22px; text-align: center;
}

/* Icône panier posée dans le bandeau (attribut data-feelloo-open-cart) */
[data-feelloo-open-cart] { position: relative; cursor: pointer; }
body:not(.elementor-editor-active) .fc-is-empty { display: none !important; }
.fc-count {
  position: absolute; top: -6px; right: -10px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px; background: #e5c13d; color: #2f5196;
  font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; pointer-events: none;
}
.fc-is-empty .fc-count { display: none; }

/* Volet */
.fc-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 99998; }
.fc-drawer {
  position: fixed; top: 0; right: 0; z-index: 99999;
  width: min(420px, 100vw); height: 100%; height: 100dvh;
  background: #fff; box-shadow: -4px 0 20px rgba(0,0,0,.15);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .25s ease; visibility: hidden;
}
.fc-drawer.is-open { transform: translateX(0); visibility: visible; }

.fc-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--fc-line);
}
.fc-title { font-size: 22px; font-weight: 700; color: var(--fc-blue); }
.fc-close {
  width: 36px; height: 36px; border: 1px solid var(--fc-line); border-radius: 8px;
  background: #fff; font-size: 24px; line-height: 1; cursor: pointer; color: var(--fc-text);
}

.fc-body { flex: 1; overflow-y: auto; padding: 8px 20px; }
.fc-empty { color: var(--fc-muted); padding: 24px 0; text-align: center; }

.fc-line {
  display: grid; grid-template-columns: 64px 1fr; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--fc-line); align-items: start;
}
.fc-img { width: 64px; height: 64px; object-fit: contain; border-radius: 8px; background: transparent; }
.fc-name { font-weight: 600; line-height: 1.3; }
.fc-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.fc-unit { color: var(--fc-muted); font-size: 14px; margin: -4px 0 8px; }
.fc-linetotal { font-weight: 600; white-space: nowrap; }

.fc-qty { display: flex; align-items: center; gap: 8px; }
.fc-qty button {
  width: 30px; height: 30px; border: 1px solid var(--fc-line); border-radius: 6px;
  background: #fff; cursor: pointer; font-size: 16px; line-height: 1; color: var(--fc-text);
}
.fc-qty button[disabled] { opacity: .4; cursor: default; }
.fc-qty span { min-width: 20px; text-align: center; font-weight: 600; }
.fc-qty .fc-del {
  width: auto; height: auto; border: 0; padding: 0 0 0 8px;
  font-size: 14px; color: var(--fc-muted); text-decoration: underline; background: none;
  margin-left: auto;
}

.fc-upsell {
  display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; align-items: center;
  margin: 16px 0; padding: 10px; border: 1px dashed var(--fc-blue); border-radius: 10px;
}
.fc-upsell .fc-img { width: 48px; height: 48px; }
.fc-upsell-txt { font-size: 14px; line-height: 1.3; }
.fc-upsell button {
  border: 0; border-radius: 20px; padding: 6px 12px; cursor: pointer;
  background: var(--fc-blue); color: #fff; font-weight: 600; white-space: nowrap;
}

.fc-foot { padding: 16px 20px 20px; border-top: 1px solid var(--fc-line); }
.fc-total { display: flex; justify-content: space-between; font-size: 18px; }
.fc-total strong { color: var(--fc-blue); }
.fc-note { margin: 6px 0 14px; font-size: 13px; color: var(--fc-muted); }
.fc-checkout {
  display: block; text-align: center; text-decoration: none;
  padding: 14px; border-radius: 30px;
  background: var(--fc-yellow); color: var(--fc-blue) !important;
  font-size: 18px; font-weight: 700;
}
.fc-checkout:hover { filter: brightness(.95); }
.fc-trust { margin: 10px 0 0; text-align: center; font-size: 13px; color: var(--fc-muted); }

/* Mobile : cibles tactiles de 44 px minimum */
@media (max-width: 767px) {
  .fc-head { padding: 14px 16px; }
  .fc-body { padding: 4px 16px; }
  .fc-foot { padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); }
  .fc-close { width: 44px; height: 44px; }
  .fc-qty { gap: 10px; flex-wrap: wrap; }
  .fc-qty button { width: 44px; height: 44px; font-size: 20px; }
  .fc-qty .fc-del { height: 44px; padding-left: 4px; }
  .fc-upsell button { padding: 12px 14px; }
  .fc-fab { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); }
}
