:root {
  --bg: #0f1115;
  --surface: #171a21;
  --surface-2: #1e222b;
  --border: #2a2f3a;
  --text: #e7e9ee;
  --muted: #8b93a3;
  --accent: #4f8cff;
  --ok: #34c98b;
  --warn: #f0a83a;
  --err: #f2555a;
  --radius: 10px;
}

* { box-sizing: border-box; }

/* Empeche tout debordement horizontal : cause principale de la page plus large
   que l'ecran sur mobile. min-width: 0 sur les flex items evite qu'un texte
   long etire son conteneur au-dela de la fenetre. */
html, body {
  margin: 0;
  overflow-x: hidden;
  min-width: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

h1 { font-size: 20px; margin: 0 0 6px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.error { color: var(--err); min-height: 18px; }
.empty { color: var(--muted); padding: 24px; text-align: center; }

input, select, textarea, button {
  font: inherit;
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 8px 10px;
  background: var(--surface-2);
  color: var(--text);
  width: 100%;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

button { cursor: pointer; width: auto; font-weight: 500; }
button:hover:not(:disabled) { filter: brightness(1.15); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.ghost { background: transparent; }
button.danger { color: var(--err); }

/* Les cases a cocher gardent leur taille : la regle « width: 100% » des
   champs s'applique aux autres entrees seulement. */
input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); }

label { display: block; margin-bottom: 10px; font-size: 12px; color: var(--muted); }
label input, label select, label textarea { margin-top: 4px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

/* Le login occupe tout l'ecran et passe par-dessus tout le reste (z-index 100).
   Tant que l'utilisateur n'est pas connecte, #app reste cache avec [hidden] ;
   quand il l'est, #login est retire du DOM avec [hidden]. On utilise position
   fixed plutot que min-height pour eviter qu'un contenu residuel soit visible
   en arriere-plan au premier rendu. */
.login {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; padding: 16px;
  background: var(--bg);
}
.login[hidden] { display: none; }
.login-card { width: min(340px, 100%); }

/* L'application est masquee par defaut (attribut HTML [hidden]).
   On s'assure que le navigateur ne l'affiche jamais en CSS non plus,
   meme si un script retire hidden trop tot. */
#app[hidden] { display: none !important; }

.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--bg); z-index: 10;
  flex-wrap: wrap;
  /* Empeche la topbar d'etre plus large que la fenetre */
  min-width: 0; overflow: hidden;
}
.brand { font-weight: 700; flex-shrink: 0; }
.brand span { color: var(--muted); font-weight: 400; }

/* Onglets : defilement horizontal sur mobile plutot que troncature.
   flex: 1 1 auto permet aux onglets de prendre la largeur disponible
   sans deborder. Sur desktop ils restent sur une ligne, sur mobile ils
   passent dessous (flex-wrap sur .topbar) et defilent. */
.tabs {
  display: flex; gap: 6px;
  overflow-x: auto; scrollbar-width: none;
  flex: 1 1 auto; min-width: 0;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  background: transparent; border-color: transparent; color: var(--muted);
  white-space: nowrap; flex-shrink: 0;
}
.tabs button.active { background: var(--surface-2); color: var(--text); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.badge {
  display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--accent); color: #fff; font-size: 11px; text-align: center;
}

.pill {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; border: 1px solid var(--border);
}
.pill-ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.pill-warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }

main { padding: 20px; max-width: 100%; overflow-x: hidden; }
.tab { display: none; }
.tab.active { display: block; }

/* Barre d'outils : flex-wrap permet aux boutons de passer à la ligne sur
   mobile plutôt que de déborder. align-items: flex-start évite que le bouton
   Actualiser s'étire en hauteur quand la toolbar est en colonne. */
.toolbar {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }

.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
.grid-tight { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.pending-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.pending-body { display: grid; grid-template-columns: 130px 1fr; gap: 14px; }
.previews { display: flex; flex-direction: column; gap: 6px; }
/* Vignettes cliquables : images et videos ont la meme taille pour que la
   colonne reste reguliere, que l'article porte une photo ou une video. */
.previews .preview-media {
  width: 130px; height: 100px; object-fit: cover; border-radius: 6px;
  background: var(--surface-2); cursor: zoom-in; display: block;
}
video.preview-media { object-fit: contain; background: #000; cursor: pointer; }
.preview-media:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.video-chip {
  padding: 6px; text-align: center; border-radius: 6px;
  background: var(--surface-2); color: var(--muted); font-size: 12px;
}
.pending-actions { display: flex; gap: 8px; margin-top: 12px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: 12px; color: var(--muted); font-weight: 500; background: var(--surface-2); }
td select { min-width: 150px; }
.name-cell { font-weight: 500; }
.name-cell .name-meta { display: block; font-weight: 400; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; background: var(--surface-2); }

.cat-card { display: grid; gap: 8px; }
/* ---------- panneau médias produit ---------- */
.media-panel { margin-top: 16px; }
.media-panel summary { cursor: pointer; font-weight: 500; }

/* Grille de vignettes : 3 par ligne sur desktop, 2 sur mobile.
   Chaque vignette affiche l'image, l'URL tronquée et un bouton supprimer. */
.media-grid {
  list-style: none; padding: 0; margin: 12px 0;
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}
.media-grid-item {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px; min-width: 0;
}
.media-thumb-wrap {
  width: 100%; aspect-ratio: 1; overflow: hidden;
  border-radius: 6px; background: var(--surface); display: grid; place-items: center;
}
.media-thumb-wrap img, .media-thumb-wrap video {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
/* Fallback texte si l'image est inaccessible */
.media-thumb-broken {
  font-size: 11px; color: var(--warn); text-align: center; padding: 4px;
}
/* Placeholder embed (YouTube/Vimeo) */
.media-thumb-embed {
  font-size: 12px; color: var(--muted); text-align: center; padding: 8px;
}
/* URL tronquée avec ellipse : min-width:0 nécessaire sur le parent flex */
.media-url-label {
  font-size: 10px; color: var(--muted); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; display: block;
}
.media-grid-item .ghost.danger { font-size: 11px; padding: 4px 6px; margin-top: 2px; }

.toast {
  position: fixed; bottom: 20px; right: 20px; padding: 12px 16px;
  border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgb(0 0 0 / .4); z-index: 20;
}
.toast-err { border-color: var(--err); color: var(--err); }

/* ---------- televersement de medias ---------- */
/* La ligne du tableau qui s'ouvre sous le produit : pas de bordure propre,
   le panneau interne suffit a se detacher du tableau. */
tr.media-row > td { padding: 0; background: var(--surface-2); }
tr.media-row .media-panel { padding: 16px; border-left: 3px solid var(--accent); }
tr.media-open > td { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.media-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.media-head .ghost { margin-left: auto; }

.upload-box {
  display: grid; gap: 8px; margin: 14px 0; padding: 18px;
  border: 2px dashed var(--line); border-radius: 10px;
  background: var(--surface-1); text-align: center;
  transition: border-color .15s, background .15s;
}
.upload-box.dragover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface-1)); }
.upload-actions {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; flex-wrap: wrap;
}
.upload-box .small { margin: 0; min-height: 16px; }
.media-list video.thumb { background: #000; }

/* ---------- visualiseur de medias ---------- */
.viewer {
  position: fixed; inset: 0; z-index: 60;
  display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: 1fr auto;
  gap: 10px; padding: 56px 16px 16px;
  background: rgb(0 0 0 / .92);
}
.viewer[hidden] { display: none; }
.viewer-stage {
  grid-column: 2; grid-row: 1;
  display: grid; place-items: center; min-height: 0; min-width: 0;
}
.viewer-stage img, .viewer-stage video {
  max-width: 100%; max-height: 100%; border-radius: 8px; background: #000;
}
.viewer-close, .viewer-nav {
  background: rgb(255 255 255 / .12); border-color: transparent; color: #fff;
  font-size: 22px; line-height: 1; display: grid; place-items: center;
}
.viewer-close {
  position: absolute; top: 12px; right: 16px;
  width: 40px; height: 40px; border-radius: 999px;
}
.viewer-nav { width: 48px; height: 48px; border-radius: 999px; align-self: center; }
.viewer-prev { grid-column: 1; grid-row: 1; }
.viewer-next { grid-column: 3; grid-row: 1; }
.viewer-close[hidden], .viewer-nav[hidden] { display: none; }
.viewer-count { grid-column: 1 / -1; grid-row: 2; text-align: center; margin: 0; }

/* ---------- filtre de canaux (file d'attente) ---------- */
/* .filter-menu est le CONTENEUR de référence du dropdown : c'est lui qui est
   positionné pour que .filter-panel puisse se poser en absolu sous le bouton.
   Le panneau est replié/déplié par l'attribut hidden, pas en inline. */
.filter-menu { position: relative; display: flex; flex-direction: column; gap: 6px; }
#channel-filter-toggle { display: flex; align-items: center; gap: 8px; white-space: nowrap; }

.burger { position: relative; flex: 0 0 auto; width: 14px; height: 2px; background: currentColor; }
.burger::before, .burger::after {
  content: ""; position: absolute; left: 0; width: 14px; height: 2px; background: currentColor;
}
.burger::before { top: -5px; }
.burger::after { top: 5px; }

.badge-warn { background: var(--warn); color: #171a21; }

/* Panneau canaux : position absolute sous le bouton hamburger pour ne pas
   pousser la grille. max-height + overflow-y permettent de scroller quand
   il y a beaucoup de canaux. z-index élevé pour passer au-dessus des cartes. */
.filter-panel {
  position: absolute; top: calc(100% + 6px); left: 0;
  width: 260px; max-width: calc(100vw - 32px);
  max-height: 320px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 6px; padding: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgb(0 0 0 / .5);
  z-index: 50;
}
.filter-panel[hidden] { display: none; }
.filter-panel-title { flex: 0 0 auto; font-size: 12px; color: var(--muted); margin: 0; }

.channel-row {
  display: flex; align-items: center; gap: 10px; margin: 0;
  padding: 6px 8px; border-radius: 8px; font-size: 13px; color: var(--text); cursor: pointer;
}
.channel-row:hover { background: var(--surface); }
.channel-row input { margin-top: 0; flex: 0 0 auto; }
.channel-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.filter-panel-actions { display: flex; gap: 6px; padding-top: 8px; border-top: 1px solid var(--border); }
.filter-panel-actions button { flex: 1; padding: 6px 8px; font-size: 12px; }

/* ---------- mobile ---------- */
html { -webkit-text-size-adjust: 100%; }

/* Tous les flex items doivent pouvoir rétrécir en dessous de leur contenu
   naturel sur mobile : sans min-width:0 un texte long fait déborder son
   conteneur flex. */
.card, .pending-card, .cat-card { min-width: 0; }

@media (max-width: 900px) {
  .topbar { padding: 10px 14px; }
  /* Les onglets passent sur une deuxième ligne et prennent toute la largeur */
  .tabs { order: 3; width: 100%; }
  .topbar-right { margin-left: auto; }
}

@media (max-width: 760px) {
  main { padding: 14px; }
  .grid, .grid-tight { grid-template-columns: 1fr; }

  /* La carte d'attente passe au-dessus des champs : le tactile a besoin
     de la largeur pour saisir nom, prix et catégorie. */
  .pending-body { grid-template-columns: 1fr; }
  .pending-head { flex-wrap: wrap; gap: 6px; }
  .previews { flex-direction: row; flex-wrap: wrap; }
  .previews img { width: 96px; height: 96px; }
  .video-chip { align-self: flex-start; padding: 6px 12px; }

  /* Sur mobile la barre d'outils s'empile verticalement, chaque section
     prend la pleine largeur. Les boutons ont une hauteur auto (pas étirée). */
  .toolbar { align-items: stretch; }
  .toolbar .filters { width: 100%; }
  .toolbar-actions { width: 100%; }
  .toolbar-actions button { flex: 1; width: auto; height: auto; }

  /* Sur téléphone le panneau passe dans le flux : en absolu il déborderait de
     l'écran, et la règle qui étire tous les boutons de la barre d'outils
     casserait sa mise en page interne. */
  .filter-menu { flex: 1 1 auto; }
  .filter-panel { position: static; width: 100%; max-height: 260px; margin-top: 10px; }
  .filter-panel button { width: 100%; }

  /* Le tableau produits devient une liste de cartes */
  #products-table thead { display: none; }
  #products-table, #products-table tbody, #products-table tr, #products-table td { display: block; }
  #products-table tr { padding: 10px 12px; border-bottom: 1px solid var(--border); }
  #products-table tr:last-child { border-bottom: 0; }
  #products-table td {
    border: 0; padding: 6px 0;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    min-width: 0;
  }
  #products-table td::before {
    content: attr(data-label);
    color: var(--muted); font-size: 12px; flex: 0 0 84px;
  }
  #products-table td[data-label="Selection"] { justify-content: flex-start; }
  #products-table td[data-label="Selection"]::before { flex: 0 0 auto; }
  #products-table td[data-label="Nom"] { font-size: 15px; }
  #products-table td[data-label="Actions"] { justify-content: flex-start; padding-top: 10px; }
  #products-table td[data-label="Actions"]::before { display: none; }
  #products-table td select { min-width: 0; flex: 1; }
  #products-table td.empty { display: block; padding: 24px 0; }
  /* La ligne de médias conserve sa mise en page bloc */
  #products-table tr.media-row { padding: 0; }
  #products-table tr.media-row > td { display: block; padding: 0; }
  #products-table tr.media-row > td::before { display: none; }
  /* Idem pour la ligne du panneau « Modifier » : bloc pleine largeur, sans
     le pseudo-label qui la decalait de 84px. */
  #products-table tr.edit-row { padding: 0; }
  #products-table tr.edit-row > td { display: block; padding: 0; }
  #products-table tr.edit-row > td::before { display: none; }
  .edit-fields { grid-template-columns: 1fr; }
  .edit-actions { flex-wrap: wrap; }
  .edit-actions button { flex: 1 1 auto; }
  .media-head { flex-wrap: wrap; }
  .upload-actions { flex-direction: column; }
  .thumb { width: 56px; height: 56px; }
  .actions { gap: 8px; }
  .actions button { flex: 1 0 auto; }
}

@media (max-width: 560px) {
  .row { grid-template-columns: 1fr; }
  .filters { flex-direction: column; }
  .login-card { width: min(340px, 100%); }
  .card { padding: 14px; }
  input, select, textarea, button { min-height: 40px; }
  .pending-actions { flex-direction: column; }
  .pending-actions button { width: 100%; }
  .media-list li { flex-wrap: wrap; }
  .media-list code { flex: 1 1 100%; }
  .toast { left: 12px; right: 12px; bottom: 12px; }
}

/* ---------- panneau de personnalisation FLUX ---------- */
.customize-overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgb(0 0 0 / .6);
  display: grid; place-items: center;
  padding: 16px;
}
.customize-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); width: min(640px, 100%);
  max-height: 90vh; overflow-y: auto;
  display: flex; flex-direction: column;
}
.customize-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.customize-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.customize-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.customize-presets .ghost { font-size: 12px; padding: 4px 10px; }

/* Image source sélectionnée : bordure accentuée */
.source-item { cursor: pointer; transition: border-color .15s; }
.source-item.source-selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.source-check { font-size: 11px; color: var(--muted); text-align: center; }
.source-item.source-selected .source-check { color: var(--accent); font-weight: 600; }

/* Grille des variantes générées */
.flux-results { margin-top: 12px; }
.flux-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.flux-item {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px;
}
.flux-thumb { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.flux-item-actions { display: flex; gap: 4px; }
.flux-item-actions button { flex: 1; font-size: 11px; padding: 4px 6px; }

@media (max-width: 760px) {
  .customize-panel { max-height: 100vh; border-radius: 0; }
  .customize-overlay { padding: 0; }
}

/* ---------- import produits depuis le téléphone ---------- */
.import-panel {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; margin-bottom: 16px; background: var(--surface-2);
}
.import-panel[hidden] { display: none; }
/* Masquage visuel sans display:none : indispensable pour que l'input file
   puisse être ouvert par .click() sur iOS/mobile Safari (un input en
   display:none y est refusé). */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.import-dropzone {
  display: grid; gap: 8px; padding: 18px; text-align: center;
  border: 2px dashed var(--line); border-radius: 10px;
  background: var(--surface-1); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.import-dropzone.dragover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface-1)); }
.import-dropzone-title { font-size: 14px; }
.import-dropzone .primary { justify-self: center; }
.import-log { list-style: none; padding: 10px 0 0; margin: 8px 0 0; display: grid; gap: 6px; }
.import-log li {
  display: flex; gap: 10px; align-items: baseline; justify-content: space-between;
  font-size: 13px; padding: 6px 10px; background: var(--surface-1);
  border: 1px solid var(--border); border-radius: 6px;
}
.import-file { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-progress { color: var(--muted); flex-shrink: 0; }
a.import-open { color: var(--accent); font-weight: 500; text-decoration: none; cursor: pointer; flex-shrink: 0; }
a.import-open:hover { text-decoration: underline; }

/* Case « Rédiger avec l'IA » dans la zone d'import (titre + description). */
.import-ai {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 13px; color: var(--muted); cursor: pointer;
}
.import-ai input { width: auto; min-height: 0; }

/* ---------- panneau d'édition produit (sous la ligne) ---------- */
tr.edit-row > td { padding: 0; background: var(--surface-2); overflow: visible; }
tr.edit-row .edit-panel { padding: 16px; border-left: 3px solid var(--accent); }
/* Le panneau « Modifier » est une ligne de tableau : il doit occuper toute la
   largeur sans etre decale par le pseudo-element data-label des cellules.
   (Sur mobile, les regles display:block de la ligne edit sont dans la media.) */
#products-table tr.edit-row > td::before { content: none; }
.edit-panel .edit-fields > label { min-width: 0; }
.edit-fields input, .edit-fields textarea, .edit-fields select { width: 100%; }
/* Les deux selects de la cellule « Section / Categorie » s'empilent : cote a
   cote ils elargissent la colonne et poussent le tableau hors de l'ecran. */
#products-table td[data-label="Section / Categorie"] { display: grid; gap: 6px; }
#products-table td[data-label="Section / Categorie"] select { width: 100%; }
#products-table .gender-select { margin-bottom: 0; }
tr.edit-open > td { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.edit-panel .media-head { margin-bottom: 10px; }
.edit-fields {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.edit-fields label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.edit-fields input, .edit-fields textarea, .edit-fields select { min-height: 38px; }
.edit-fields label:first-child, .edit-fields label:nth-child(2) { grid-column: 1 / -1; }
.edit-actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; }

/* Badge de publication Facebook dans la colonne État */
.fb-badge { margin-left: 4px; }

/* ---------- Sections (rayons Boutique) ---------- */
/* Pastille de section affichee sous le nom du produit. */
.pill-section {
  margin-left: 6px; padding: 1px 8px; font-size: 11px;
  color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}
.gender-select { margin-bottom: 6px; }

/* Menu « Partager » : liste des pages Facebook, ouverte SOUS le bouton clique.
   .share-wrap est le conteneur de reference du positionnement absolu. */
.share-wrap { position: relative; display: inline-flex; }
.share-menu {
  position: absolute; top: calc(100% + 6px); right: 0;
  min-width: 210px; display: flex; flex-direction: column; gap: 4px; padding: 8px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgb(0 0 0 / .5); z-index: 60; text-align: left;
}
.share-menu[hidden] { display: none; }
.share-menu button { justify-content: flex-start; width: 100%; text-align: left; white-space: nowrap; }
.share-menu button:disabled { opacity: .45; cursor: not-allowed; }
.fb-done { color: var(--ok); font-weight: 700; }

/* Ligne du produit dont le panneau d'édition est ouvert : léger surlignage */
