/* ============================================================
   Plateforme descriptions produit - charte docs-entreprise (clair)
   Accent vert #70A25B · surfaces claires · la référence d'abord

   Même palette et mêmes gestes que ref.docs-entreprise.com : les deux
   plateformes sont ouvertes par les mêmes personnes, souvent côte à côte.
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

:root {
  --tete: 52px;
  --bg:        #f3f4fa;
  --shell:     #ffffff;
  --ink:       #1c1f2b;
  --ink-2:     #565a72;
  --ink-3:     #8b8fa6;
  --line:      #e6e7f1;
  --line-2:    #eef0f7;
  --field:     #f5f6fc;

  --accent:      #70A25B;
  --accent-ink:  #4d7a3b;
  --accent-soft: color-mix(in srgb, var(--accent) 12%, #ffffff);
  --accent-line: color-mix(in srgb, var(--accent) 40%, #ffffff);
  --halo:        0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);

  --danger:  #c8492f;
  --attente: #b07818;
  --attente-soft: rgba(240, 170, 50, .16);

  --shadow-card: 0 1px 2px rgba(28,30,46,.05), 0 8px 24px rgba(28,30,46,.07);
  --shadow-pop:  0 10px 34px rgba(28,30,46,.16);
  --radius: 12px;
}

html, body { height: 100%; }

body {
  background: var(--shell);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ic { display: block; width: 1em; height: 1em; flex: 0 0 auto; }

/* ---------- Header ---------- */
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 20px;
  background: var(--shell);
  border-bottom: 1px solid var(--line);
  flex: none;
}
.brand { flex: 1; min-width: 0; }
.brand-title { font-weight: 650; font-size: .95rem; letter-spacing: -.01em; }
.brand-sub { font-size: .72rem; color: var(--ink-3); margin-top: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

.source-etat {
  font-size: .68rem; font-weight: 600;
  padding: 4px 9px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-ink);
  white-space: nowrap;
}
.source-etat.ko { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }

.icon-help {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--shell);
  color: var(--ink-2); font-size: .78rem; font-weight: 700;
  cursor: pointer; font-family: inherit;
  transition: background .14s, border-color .14s, color .14s;
}
.icon-help:hover { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-ink); }

.nav-round {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--shell);
  color: var(--ink-2); cursor: pointer;
  transition: background .14s, box-shadow .14s;
}
.nav-round .ic { width: 20px; height: 20px; }
.nav-round:hover { background: var(--accent-soft); box-shadow: var(--halo); }

/* ---------- Boutons ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--shell);
  color: var(--ink-2); font: inherit; font-size: .76rem; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: background .14s, border-color .14s, color .14s, box-shadow .14s;
}
.pill .ic { width: 15px; height: 15px; }
.pill:hover { background: var(--field); border-color: var(--accent-line); color: var(--ink); }
.pill.accent { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-ink); }
.pill.accent:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.pill.danger { color: var(--danger); }
.pill.danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); border-color: color-mix(in srgb, var(--danger) 40%, #fff); color: var(--danger); }
.pill:disabled { opacity: .45; cursor: default; box-shadow: none; }
.pill:focus-visible { outline: none; box-shadow: var(--halo); }

/* ---------- Structure ---------- */
/* `position: relative` : en vue étroite, le panneau devient un tiroir posé
   DANS cette zone. Le caler sur une hauteur d'en-tête fixe le décalerait dès
   que le titre passe sur deux lignes - ce qui arrive sur un téléphone. */
.layout { flex: 1; display: flex; min-height: 0; position: relative; }

.panel {
  flex: 0 0 340px; min-width: 0;
  display: flex; flex-direction: column;
  background: var(--shell);
  border-right: 1px solid var(--line);
}
.panel[hidden] { display: none; }

/* ---------- Panneau de gauche ----------
   Même construction que ref.docs-entreprise.com : la barre de recherche occupe
   une ligne de la HAUTEUR D'EN-TÊTE, si bien qu'elle s'aligne pile avec
   l'en-tête du document à droite. Les deux plateformes sont ouvertes côte à
   côte : une ligne qui se poursuit d'un panneau à l'autre, ça se voit. */
.panel-search {
  height: var(--tete);
  box-sizing: border-box;
  display: flex; align-items: center;
  padding: 0 12px;
  border-bottom: 1px solid var(--line); flex: none;
}
.panel-search .ps-field { flex: 1; }
.ps-field {
  display: flex; align-items: center; gap: 8px;
  padding: 0 10px; height: 36px;
  background: var(--field); border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color .14s, box-shadow .14s, background .14s;
}
.ps-field:focus-within { background: var(--shell); border-color: var(--accent-line); box-shadow: var(--halo); }
.ps-ico { color: var(--ink-3); display: grid; place-items: center; }
.ps-ico .ic { width: 16px; height: 16px; }
.ps-field input {
  flex: 1; min-width: 0; border: none; background: none; outline: none;
  font: inherit; font-size: .82rem; color: var(--ink);
}
.ps-field input::-webkit-search-cancel-button { display: none; }
.ps-clear {
  border: none; background: none; color: var(--ink-3);
  cursor: pointer; display: grid; place-items: center; padding: 2px;
}
.ps-clear .ic { width: 14px; height: 14px; }
.ps-clear:hover { color: var(--ink); }

/* Les filtres ne font pas partie de l'en-tête : ils viennent APRÈS la ligne,
   en retrait, pour que l'alignement des deux en-têtes reste lisible. */
.panel-filtres {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 7px; padding: 10px 12px;
  border-bottom: 1px solid var(--line-2); flex: none;
}
.panel-filtres select {
  width: 100%; min-width: 0;
  padding: 6px 8px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--field);
  font: inherit; font-size: .72rem; color: var(--ink-2);
  cursor: pointer; outline: none;
}
.panel-filtres select:last-child { grid-column: 1 / -1; }
.panel-filtres select:focus { border-color: var(--accent-line); box-shadow: var(--halo); }

.panel-list { flex: 1; overflow-y: auto; padding: 6px; min-height: 0; }

.item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 9px; border-radius: 10px;
  cursor: pointer; border: 1px solid transparent;
  transition: background .12s, border-color .12s;
  position: relative;
}
.item:hover { background: var(--field); }
/* Sélection : le même geste que sur ref.docs-entreprise.com - un fond de champ
   et un trait à gauche, plutôt qu'un aplat coloré. La couleur d'accent sert
   aux états du produit (publié, brouillon) ; la garder pour « où je suis »
   ferait dire deux choses à la même teinte. */
.item.on { background: var(--field); border-color: transparent; }
.item.on::before {
  content: "";
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 3px; border-radius: 3px;
  background: var(--ink);
}

/* Ce qui a fait remonter le résultat, en gras appuyé. */
.item-nom .hit { font-weight: 800; }
.item-sub .hit { font-weight: 800; color: var(--ink-2); }
.item-vign {
  flex: 0 0 40px; width: 40px; height: 40px;
  border-radius: 8px; background: var(--field);
  border: 1px solid var(--line-2);
  display: grid; place-items: center; overflow: hidden;
}
.item-vign img { max-width: 100%; max-height: 100%; object-fit: contain; }
.item-vign span { font-size: .6rem; color: var(--ink-3); }
.item-txt { flex: 1; min-width: 0; }
.item-nom {
  font-size: .78rem; font-weight: 600; line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.item-sub {
  font-size: .67rem; color: var(--ink-3); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.item-etats { flex: 0 0 auto; display: flex; gap: 4px; }

/* Les deux pastilles d'état : description et images. Une couleur ne suffit
   pas - chacune porte une lettre, lisible même sans distinguer les teintes. */
.pastille {
  width: 18px; height: 18px; border-radius: 6px;
  display: grid; place-items: center;
  font-size: .58rem; font-weight: 700; letter-spacing: .02em;
  background: var(--field); color: var(--ink-3);
  border: 1px solid var(--line);
}
.pastille.publie   { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent-line); }
.pastille.modifie  { background: var(--attente-soft); color: var(--attente); border-color: color-mix(in srgb, var(--attente) 30%, #fff); }
.pastille.pret     { background: color-mix(in srgb, #4b7bd8 12%, #fff); color: #3a63b3; border-color: color-mix(in srgb, #4b7bd8 34%, #fff); }
.pastille.brouillon{ background: var(--field); color: var(--ink-2); }
.pastille.absent   { opacity: .45; }

.panel-vide { padding: 26px 18px; text-align: center; color: var(--ink-3); font-size: .76rem; line-height: 1.6; }

.panel-pied {
  flex: none; padding: 9px 12px;
  border-top: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.panel-count { font-size: .68rem; color: var(--ink-3); }

/* ---------- Zone de droite ---------- */
.viewer { flex: 1; min-width: 0; overflow-y: auto; background: var(--bg); }

.viewer-empty {
  height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  padding: 40px; text-align: center;
}
.viewer-empty-icon { font-size: 2rem; color: var(--ink-3); opacity: .5; }
.viewer-empty-title { font-size: .92rem; font-weight: 650; }
.viewer-empty-sub { font-size: .78rem; color: var(--ink-3); max-width: 420px; line-height: 1.6; }

/* ---------- Zone de droite ----------
   L'en-tête du document répond à celui de la recherche : même hauteur, même
   trait de séparation, et il reste en place quand on fait défiler - ce qu'on
   lit plus bas appartient toujours à cette référence-là. */
.doc-toolbar {
  position: sticky; top: 0; left: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: var(--tete); box-sizing: border-box;
  padding: 0 22px;
  background: var(--shell);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .02);
}
.dt-gauche { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.dt-nom {
  font-size: .86rem; font-weight: 650; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dt-ref { font-size: .72rem; color: var(--ink-3); white-space: nowrap; }
.dt-droite { display: flex; align-items: center; gap: 7px; flex: none; }

.viewer-content { padding: 0 0 40px; }
.viewer-corps { padding: 20px 24px 0; max-width: 980px; margin: 0 auto; }
/* Les états transitoires (chargement, erreur) sont posés directement dans le
   conteneur, qui n'a plus de marge à lui : on la leur rend. */
.viewer-content > .a-venir { padding: 24px; }

/* En-tête du produit */
.prod-tete {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--shell); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow-card);
}
.prod-vign {
  flex: 0 0 92px; width: 92px; height: 92px;
  border-radius: 10px; background: var(--field);
  border: 1px solid var(--line-2);
  display: grid; place-items: center; overflow: hidden;
}
.prod-vign img { max-width: 100%; max-height: 100%; object-fit: contain; }
.prod-vign span { font-size: .64rem; color: var(--ink-3); }
.prod-tete-txt { flex: 1; min-width: 0; }
.prod-nom { font-size: 1.02rem; font-weight: 680; letter-spacing: -.01em; line-height: 1.25; }
.prod-meta { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 6px; }
.meta-chip {
  font-size: .68rem; padding: 3px 8px; border-radius: 7px;
  background: var(--field); color: var(--ink-2); border: 1px solid var(--line-2);
}
.meta-chip b { font-weight: 650; color: var(--ink); }
.prod-actions { display: flex; gap: 7px; margin-top: 12px; flex-wrap: wrap; }

/* Le SKU se modifie sur place : c'est la seule donnée d'ici qui décide où
   part l'écriture, elle mérite d'être sous les yeux et corrigeable. */
.sku-champ { display: flex; align-items: center; gap: 6px; }
.sku-champ input {
  width: 150px; padding: 4px 8px; border-radius: 7px;
  border: 1px solid var(--line); background: var(--field);
  font: inherit; font-size: .72rem; font-weight: 650; color: var(--ink); outline: none;
}
.sku-champ input:focus { background: var(--shell); border-color: var(--accent-line); box-shadow: var(--halo); }

/* Onglets */
.onglets {
  display: flex; gap: 4px; margin: 18px 0 0;
  border-bottom: 1px solid var(--line);
}
.onglet {
  padding: 9px 14px; border: none; background: none;
  font: inherit; font-size: .78rem; font-weight: 600; color: var(--ink-3);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .14s, border-color .14s;
}
.onglet:hover { color: var(--ink); }
.onglet.on { color: var(--accent-ink); border-bottom-color: var(--accent); }

.volet { padding: 18px 0 0; }

.bloc {
  background: var(--shell); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; margin-bottom: 14px;
}
.bloc-titre {
  font-size: .7rem; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px;
}
.bloc p { font-size: .82rem; line-height: 1.65; color: var(--ink-2); }

.paires { display: grid; grid-template-columns: minmax(120px, 200px) 1fr; gap: 6px 14px; font-size: .8rem; }
.paires dt { color: var(--ink-3); }
.paires dd { color: var(--ink); }

.liste-puces { font-size: .82rem; line-height: 1.7; color: var(--ink-2); padding-left: 18px; }

.galerie-mini { display: flex; gap: 8px; flex-wrap: wrap; }
.galerie-mini img {
  width: 76px; height: 76px; object-fit: contain;
  background: var(--field); border: 1px solid var(--line-2); border-radius: 9px; padding: 4px;
}

/* Journal */
.jrn { display: flex; flex-direction: column; gap: 7px; }
.jrn-ligne {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 11px; border-radius: 9px;
  background: var(--field); border: 1px solid var(--line-2);
  font-size: .76rem;
}
.jrn-ligne.ko { background: color-mix(in srgb, var(--danger) 7%, transparent); border-color: color-mix(in srgb, var(--danger) 22%, #fff); }
.jrn-pt { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; background: var(--accent); }
.jrn-ligne.ko .jrn-pt { background: var(--danger); }
.jrn-txt { flex: 1; min-width: 0; }
.jrn-quoi { font-weight: 600; }
.jrn-quand { font-size: .68rem; color: var(--ink-3); margin-top: 2px; }
.jrn-err { color: var(--danger); font-size: .72rem; margin-top: 3px; }

/* Ce qui n'est pas encore livré le dit franchement, plutôt que d'afficher
   un écran vide qu'on prendrait pour une panne. */
.a-venir {
  padding: 26px 18px; text-align: center;
  color: var(--ink-3); font-size: .78rem; line-height: 1.65;
  background: var(--shell); border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.a-venir b { color: var(--ink-2); font-weight: 650; }

/* ---------- Modale ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(24, 26, 40, .34);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal {
  width: 100%; max-width: 520px; max-height: 84vh; overflow-y: auto;
  background: var(--shell); border-radius: 16px;
  box-shadow: var(--shadow-pop); padding: 22px 24px 20px;
}
.modal h3 { font-size: .92rem; font-weight: 700; letter-spacing: -.01em; }
.modal .m-sub { font-size: .76rem; color: var(--ink-3); margin-top: 5px; line-height: 1.55; }
.modal .m-corps { margin-top: 16px; }
.modal .m-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

.champ { display: flex; flex-direction: column; gap: 5px; }
.champ label { font-size: .72rem; font-weight: 600; color: var(--ink-2); }
.champ input {
  padding: 9px 11px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--field);
  font: inherit; font-size: .84rem; color: var(--ink); outline: none;
}
.champ input:focus { background: var(--shell); border-color: var(--accent-line); box-shadow: var(--halo); }

.m-msg { font-size: .76rem; line-height: 1.55; margin-top: 12px; padding: 10px 12px; border-radius: 9px; }
.m-msg.ko { background: color-mix(in srgb, var(--danger) 9%, transparent); color: var(--danger); }
.m-msg.info { background: var(--field); color: var(--ink-2); }
.m-msg.ok { background: var(--accent-soft); color: var(--accent-ink); }

.trouve {
  margin-top: 14px; padding: 13px; border-radius: 11px;
  background: var(--field); border: 1px solid var(--line);
  display: flex; gap: 12px; align-items: flex-start;
}
.trouve img {
  width: 62px; height: 62px; object-fit: contain; flex: 0 0 62px;
  background: var(--shell); border: 1px solid var(--line-2); border-radius: 8px; padding: 3px;
}
.trouve-txt { flex: 1; min-width: 0; }
.trouve-nom { font-size: .82rem; font-weight: 650; line-height: 1.3; }
.trouve-meta { font-size: .7rem; color: var(--ink-3); margin-top: 4px; line-height: 1.5; }
.trouve-desc {
  font-size: .72rem; color: var(--ink-2); margin-top: 7px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- Porte d'entrée ---------- */
.gate {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
}
.gate[hidden] { display: none; }
.gate-box {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 34px 38px 30px;
  background: var(--shell); border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(20, 24, 18, .05), 0 18px 44px rgba(20, 24, 18, .10);
}
.gate-logo { height: 54px; width: auto; margin-bottom: 4px; }
.gate-titre { font-size: .96rem; font-weight: 650; letter-spacing: -.01em; }
.gate-sous { font-size: .76rem; color: var(--ink-2); margin-top: -8px; }
.gate-pave { display: flex; gap: 9px; margin-top: 4px; }
.gate-case {
  width: 46px; height: 56px; text-align: center;
  font-size: 1.4rem; font-weight: 650; font-family: inherit; color: var(--ink);
  background: var(--field); border: 1px solid var(--line);
  border-radius: 11px; outline: none;
  transition: border-color .14s, box-shadow .14s, background .14s;
}
.gate-case:focus { background: var(--shell); border-color: var(--accent-line); box-shadow: var(--halo); }
.gate-pave.is-ko { animation: gate-non .32s; }
.gate-pave.is-ko .gate-case { border-color: #d8534f; }
@keyframes gate-non {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-6px); }
  75%      { transform: translateX(6px); }
}
.gate-msg {
  min-height: 18px; font-size: .74rem; font-weight: 600;
  color: #c9403c; text-align: center;
}
.gate-msg.neutre { color: var(--ink-2); font-weight: 500; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  z-index: 90; padding: 10px 16px; border-radius: 10px;
  background: var(--ink); color: #fff;
  font-size: .78rem; font-weight: 600;
  box-shadow: var(--shadow-pop);
  max-width: min(560px, 88vw); text-align: center; line-height: 1.45;
}
.toast.ko { background: var(--danger); }

/* ---------- Étroit ---------- */
@media (max-width: 860px) {
  .panel { position: absolute; inset: 0 auto 0 0; z-index: 40; width: min(300px, 86vw); flex: none; box-shadow: var(--shadow-pop); }
  .viewer-content { padding: 16px 14px 32px; }
  .prod-tete { flex-direction: column; }
}

/* ============================================================
   Onglet Description : à gauche ce qu'on écrit, à droite ce que ça donne.
   Les deux côte à côte, parce qu'on corrige en regardant le résultat.
   ============================================================ */

.desc-barre {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.desc-barre-g, .desc-barre-d { display: flex; align-items: center; gap: 8px; }
.desc-lbl { font-size: .7rem; font-weight: 600; color: var(--ink-3); }
.desc-barre select {
  padding: 6px 9px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--field);
  font: inherit; font-size: .75rem; color: var(--ink); cursor: pointer; outline: none;
}
.desc-barre select:focus { border-color: var(--accent-line); box-shadow: var(--halo); }

.desc-etat { font-size: .7rem; font-weight: 600; color: var(--ink-3); }
.desc-etat.ok      { color: var(--accent-ink); }
.desc-etat.attente { color: var(--attente); }
.desc-etat.sale    { color: var(--danger); }

.desc-grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 1100px) { .desc-grille { grid-template-columns: 1fr; } }

.desc-form .bloc { margin-bottom: 12px; }
.desc-champ-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.desc-remettre {
  border: none; background: none; padding: 0;
  font: inherit; font-size: .68rem; font-weight: 600;
  color: var(--accent-ink); cursor: pointer; text-decoration: underline;
}
.desc-remettre:hover { color: var(--accent); }

.desc-form textarea, .desc-form input {
  width: 100%; padding: 9px 11px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--field);
  font: inherit; font-size: .8rem; line-height: 1.6; color: var(--ink);
  outline: none; resize: vertical;
}
.desc-form textarea:focus, .desc-form input:focus {
  background: var(--shell); border-color: var(--accent-line); box-shadow: var(--halo);
}
.desc-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .72rem; min-height: 320px; }

.desc-aide { display: block; font-size: .68rem; color: var(--ink-3); margin-top: 6px; line-height: 1.55; }
.desc-aide b { color: var(--ink-2); font-weight: 650; }

.desc-auto {
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 0; border-top: 1px solid var(--line-2);
}
.desc-auto:first-of-type { border-top: none; padding-top: 0; }
.desc-auto b { font-size: .76rem; font-weight: 650; }
.desc-auto span { font-size: .68rem; color: var(--ink-3); line-height: 1.5; }

/* L'aperçu suit le défilement : on écrit en bas du formulaire tout en
   gardant le résultat sous les yeux. */
.desc-apercu { position: sticky; top: 0; align-self: start; }
.desc-apercu-tete { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.desc-largeurs { display: flex; gap: 5px; }
.desc-largeurs .pill { padding: 4px 10px; font-size: .68rem; }

.desc-cadre {
  background: var(--shell); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  height: 62vh; min-height: 380px;
}
.desc-cadre.est-mobile { max-width: 390px; margin: 0 auto; }
.desc-cadre iframe { width: 100%; height: 100%; border: none; display: block; background: #fff; }
.desc-poids { font-size: .68rem; color: var(--ink-3); margin-top: 7px; text-align: right; }
.desc-poids b { color: var(--ink-2); }
.desc-vide { color: var(--danger); font-weight: 600; }

/* Comparaison avec le site */
.site-vues { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.site-vue { border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; background: var(--field); }
.site-vue-tete { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; font-size: .76rem; }
.site-vue-tete .pastille { width: auto; padding: 0 7px; height: 17px; font-size: .58rem; }
.site-extrait {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .62rem; line-height: 1.5; color: var(--ink-2);
  max-height: 130px; overflow: auto; white-space: pre-wrap; word-break: break-all;
  background: var(--shell); border: 1px solid var(--line-2); border-radius: 7px; padding: 7px 8px;
}

/* ---------- Synchronisation ---------- */

.desc-vider {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--line-2);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.desc-vider .desc-aide { margin: 0; flex: 1; min-width: 200px; }

.sync-chiffres { display: flex; gap: 10px; margin-bottom: 14px; }
.sync-chiffre {
  flex: 1; min-width: 0; text-align: center;
  padding: 12px 8px; border-radius: 10px;
  background: var(--field); border: 1px solid var(--line-2);
}
.sync-chiffre b { display: block; font-size: 1.3rem; font-weight: 680; letter-spacing: -.02em; }
.sync-chiffre span { display: block; font-size: .66rem; color: var(--ink-3); margin-top: 3px; line-height: 1.35; }

.sync-barre {
  height: 6px; border-radius: 999px; overflow: hidden;
  background: var(--line-2); margin: 12px 0 6px;
}
.sync-barre-jauge { height: 100%; background: var(--accent); transition: width .2s; }

#syncProgres .jrn { max-height: 220px; overflow-y: auto; margin-top: 8px; }

.planif-ligne { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.planif-bascule { display: flex; align-items: center; gap: 7px; font-size: .8rem; cursor: pointer; }
.planif-bascule input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.planif-ligne input[type="time"] {
  padding: 5px 9px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--field);
  font: inherit; font-size: .78rem; color: var(--ink); outline: none;
}
.planif-ligne input[type="time"]:focus { border-color: var(--accent-line); box-shadow: var(--halo); }
.planif-alerte { color: var(--danger) !important; font-weight: 600; }
