/* ============================================================================
   mandats.css — [MANDATS1 2026-06-12] Carnet de mandats V1
   Design system : product/design_system.md (tokens, touch ≥ 44px, radius,
   famille bottom-sheet §4.6, chips 999px, contraste AA plein soleil).
   COULEUR : OR/BRONZE (planning) — #b8860b / #94700d matte, bordure #d4a017,
   pastel #fef3c7->#fde68a. [MANDATSGOLD 2026-06-13] le VERT (#16a34a) est REJETÉ
   pour les mandats (le vert appartient aux sociétés PRO). L'OR = couleur « valeur /
   résultat / but » (planning + mandats), neutre, hors familles de missions.
   La couche carte MANDAT (parcelle verte map.layers.js) reste INCHANGÉE (hors périmètre).
   ============================================================================ */

/* ------------------------------------------------ tuile menu « Mes mandats »
   [MANDATSGOLD 2026-06-13] famille OR/BRONZE planning (pastel #fef3c7->#fde68a,
   bordure #d4a017, pastille bronze #b8860b) — alignée sur la facture menupolish :
   dégradé pastel, pastille d'icône pleine, titre encre (le plein était criard).
   Le VERT #16a34a est REJETÉ pour les mandats (le vert = sociétés PRO). */
#drawer-navigation .op8-c-mandat {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #d4a017;
  color: var(--op8-ink, #0f172a);
}
#drawer-navigation .op8-c-mandat .op8-t,
#drawer-navigation .op8-c-mandat .op8-s {
  color: var(--op8-ink, #0f172a);
  text-shadow: none;
}
#drawer-navigation .op8-c-mandat .op8-t { font-weight: 700; color: #78350f; }
#drawer-navigation .op8-c-mandat .op8-s { color: #92400e; opacity: 1; }
#drawer-navigation .op8-c-mandat .op8-bicon {
  background: #b8860b;
  color: #fff;
  filter: none;
}
#drawer-navigation .op8-c-mandat .op8-chev { color: #94700d; }
#drawer-navigation .op8-c-mandat:hover {
  border-color: #b8860b;
  filter: none;
  box-shadow: 0 6px 14px rgba(120, 53, 15, .14);
}

/* ------------------------------------------------------------ mini-feuille */
#opm-root { position: fixed; inset: 0; z-index: 100000; }
#opm-root[hidden] { display: none; }
#opm-root .opm-scrim {
  position: absolute; inset: 0;
  background: rgba(15, 23, 42, .42);
  opacity: 0; transition: opacity .22s;
}
#opm-root.on .opm-scrim { opacity: 1; }
#opm-root .opm-card {
  position: absolute; left: 50%; bottom: 0;
  transform: translate(-50%, 102%);
  width: 100%; max-width: 430px;
  background: #fff;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -8px 30px rgba(15, 23, 42, .25);
  padding: 10px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  max-height: 82%;
  overflow-y: auto;
  transition: transform .26s cubic-bezier(.2, .8, .2, 1);
}
#opm-root.on .opm-card { transform: translate(-50%, 0); }
.opm-grab { width: 40px; height: 4px; border-radius: 999px; background: #e2e8f0; margin: 2px auto 10px; }
.opm-head { margin-bottom: 6px; }
.opm-ttl { font-size: 18px; font-weight: 800; letter-spacing: -.3px; color: #0f172a; }
.opm-addr { font-size: 12.5px; color: #64748b; margin-top: 2px; }

.opm-sec { margin-top: 12px; }
.opm-k {
  font-size: 11px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase;
  color: #64748b; margin-bottom: 7px; display: flex; align-items: center; gap: 6px;
}
.opm-chips { display: flex; gap: 7px; flex-wrap: wrap; }

/* chips type */
.opm-tc {
  min-height: 44px; padding: 9px 16px;
  border: 1.5px solid #d1d5db; border-radius: 999px; background: #fff;
  font-size: 13.5px; font-weight: 600; color: #334155; cursor: pointer;
}
.opm-tc.sel { border-color: #b8860b; background: #fef3c7; color: #78350f; font-weight: 700; } /* [MANDATSGOLD] or */

/* chips origine (datées = l'historique de la parcelle) */
.opm-oc {
  min-height: 44px; padding: 9px 13px;
  border: 1.5px solid #d1d5db; border-radius: 999px; background: #fff;
  font-size: 13px; font-weight: 600; color: #334155; cursor: pointer;
}
.opm-oc.has-d { border-style: solid; background: #f8fafc; }
.opm-oc.sel { border-color: #b8860b; background: #fef3c7; color: #78350f; font-weight: 700; } /* [MANDATSGOLD] or */
.opm-oc.first { box-shadow: 0 0 0 2px rgba(184, 134, 11, .40); }
.opm-oc:disabled { opacity: .55; cursor: default; }

/* chips état (gestion) */
.opm-sc {
  min-height: 44px; padding: 9px 14px;
  border: 1.5px solid #d1d5db; border-radius: 999px; background: #fff;
  font-size: 13.5px; font-weight: 700; color: #334155; cursor: pointer;
}
.opm-sc.st-actif.sel { border-color: #94700d; background: #b8860b; color: #fff; } /* [MANDATSGOLD] or */
.opm-sc.st-compromis.sel { border-color: #b8860b; background: #fef3c7; color: #78350f; } /* [MANDATSGOLD] or */
.opm-sc.st-vendu.sel { border-color: #0f172a; background: #0f172a; color: #fff; }
.opm-sc.st-perdu.sel { border-color: #94a3b8; background: #e2e8f0; color: #475569; }

/* champs date / prix */
.opm-row2 { display: flex; gap: 10px; margin-top: 12px; }
.opm-field { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.opm-field > span {
  font-size: 11px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; color: #64748b;
}
.opm-field input[type="date"] {
  min-height: 44px; border: 1.5px solid #d1d5db; border-radius: 11px;
  padding: 8px 10px; font-size: 14px; color: #0f172a; background: #fff; width: 100%;
}
.opm-eur { display: flex; align-items: center; gap: 6px; }
.opm-eur input {
  min-height: 44px; border: 1.5px solid #d1d5db; border-radius: 11px;
  padding: 8px 10px; font-size: 14px; color: #0f172a; background: #fff;
  width: 100%; min-width: 0;
}
.opm-eur b { font-size: 14px; color: #64748b; }

/* bouton principal */
.opm-save {
  display: block; width: 100%; min-height: 48px; margin-top: 16px;
  border: none; border-radius: 12px; background: #b8860b; color: #fff; /* [MANDATSGOLD] bronze */
  font-size: 14.5px; font-weight: 700; cursor: pointer;
}
.opm-save:active { filter: brightness(.93); }
.opm-save:disabled { opacity: .5; cursor: default; }
.opm-save.st-vendu { background: #0f172a; }
.opm-save.st-perdu { background: #64748b; }

.opm-err { margin-top: 10px; font-size: 12.5px; font-weight: 600; color: #b91c1c; }
.opm-meta { font-size: 13.5px; font-weight: 600; color: #334155; margin-top: 4px; line-height: 1.5; }
.opm-meta.quiet { color: #64748b; font-weight: 500; font-size: 12.5px; margin-top: 10px; }
.opm-substep { margin-top: 12px; padding: 12px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; }
.opm-substep .opm-save { margin-top: 12px; }

/* ⓘ */
.opm-i {
  width: 18px; height: 18px; border-radius: 50%; border: 1px solid #cbd5e1;
  background: #fff; color: #64748b; font-size: 11px; font-weight: 700;
  font-style: normal; line-height: 1; cursor: pointer; padding: 0;
  display: inline-grid; place-items: center; vertical-align: middle;
}
#opm-info { position: fixed; inset: 0; z-index: 100010; }
#opm-info .opm-info-scrim { position: absolute; inset: 0; background: rgba(15, 23, 42, .35); opacity: 0; transition: opacity .2s; }
#opm-info.on .opm-info-scrim { opacity: 1; }
#opm-info .opm-info-card {
  position: absolute; left: 50%; bottom: 0; transform: translate(-50%, 102%);
  width: 100%; max-width: 430px; background: #fff; border-radius: 22px 22px 0 0;
  padding: 10px 18px calc(20px + env(safe-area-inset-bottom, 0px));
  transition: transform .24s cubic-bezier(.2, .8, .2, 1);
}
#opm-info.on .opm-info-card { transform: translate(-50%, 0); }
#opm-info p { font-size: 13.5px; line-height: 1.55; color: #334155; margin: 8px 0 14px; }
#opm-info .opm-info-close {
  display: block; width: 100%; min-height: 44px; border: 1px solid #e2e8f0;
  border-radius: 11px; background: #f1f5f9; color: #334155; font-size: 14px; font-weight: 700; cursor: pointer;
}

/* ----------------------------------------------------- écran de récompense */
.opm-reward { text-align: center; padding: 6px 0 2px; }
.opm-rw-badge {
  width: 54px; height: 54px; margin: 4px auto 10px; border-radius: 50%;
  background: #b8860b; color: #fff; font-size: 26px; font-weight: 800; /* [MANDATSGOLD] bronze */
  display: grid; place-items: center;
  box-shadow: 0 0 0 7px rgba(184, 134, 11, .16);
}
.opm-rw-n { font-size: 21px; font-weight: 800; letter-spacing: -.4px; color: #0f172a; }
.opm-rw-sub { font-size: 13.5px; font-weight: 600; color: #334155; margin-top: 3px; }
.opm-rw-k {
  font-size: 11px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase;
  color: #64748b; margin: 16px 0 8px; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.opm-rw-tl { display: flex; flex-direction: column; gap: 0; text-align: left; margin: 0 6px; }
.opm-rw-step {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0 8px 14px; position: relative;
}
.opm-rw-step::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: #fde68a; /* [MANDATSGOLD] or */
}
.opm-rw-step::after {
  content: ""; position: absolute; left: -3px; top: 50%; transform: translateY(-50%);
  width: 8px; height: 8px; border-radius: 50%; background: #fcd34d; /* [MANDATSGOLD] or */
}
.opm-rw-step .d { font-size: 11.5px; font-weight: 700; color: #64748b; min-width: 64px; }
.opm-rw-step .l { font-size: 14px; font-weight: 700; color: #0f172a; }
.opm-rw-step.now::after { background: #b8860b; width: 10px; height: 10px; left: -4px; } /* [MANDATSGOLD] bronze */
.opm-rw-step.now .l { color: #78350f; }
.opm-rw-step.quiet .l { color: #94a3b8; }

/* -------------------------------------------------- module « Mes mandats » */
#opm-list { position: fixed; inset: 0; z-index: 99000; background: rgba(15, 23, 42, .42); }
#opm-list[hidden] { display: none; }
#opm-list .opm-lwrap {
  position: absolute; inset: 0; margin: 0 auto; max-width: 430px;
  background: #f1f5f9; display: flex; flex-direction: column;
  min-height: 0; /* scroll interne (piège flex connu) */
}
@media (min-width: 520px) {
  #opm-list .opm-lwrap { border-radius: 22px; margin: 16px auto; inset: 0; }
}
/* [MANDATSGOLD 2026-06-13] CORRECTION 2 — vrai BANDEAU d'en-tête or/bronze
   (pastel #fef3c7->#fde68a + bordure or, comme le bandeau % planning), cohérent
   avec les en-têtes des autres modules ; fini le titre nu « fait cheap ». */
.opm-lhead {
  display: flex; align-items: center; gap: 10px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 14px 14px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-bottom: 1px solid #d4a017;
  box-shadow: 0 2px 10px rgba(120, 53, 15, .10);
}
.opm-back {
  width: 40px; height: 40px; border: none; border-radius: 11px;
  background: rgba(255, 255, 255, .72); /* [MANDATSGOLD] lisible sur le bandeau or */
  font-size: 22px; font-weight: 700; color: #78350f; cursor: pointer; line-height: 1;
}
.opm-back:active { filter: brightness(.95); }
.opm-lttl { font-size: 17px; font-weight: 800; letter-spacing: -.3px; color: #78350f; }
.opm-lkpis { display: flex; gap: 8px; padding: 12px 14px 0; }
.opm-kpi {
  flex: 1; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
  padding: 10px 12px; display: flex; flex-direction: column; gap: 2px;
}
.opm-kpi b { font-size: 22px; font-weight: 800; letter-spacing: -.5px; color: #0f172a; }
.opm-kpi span { font-size: 11.5px; color: #64748b; line-height: 1.3; }
.opm-kpi.main { background: #b8860b; border-color: #94700d; } /* [MANDATSGOLD] bronze */
.opm-kpi.main b, .opm-kpi.main span { color: #fff; }
.opm-kpi.main span { opacity: .92; }
.opm-lfilters { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 14px; }
.opm-fc {
  min-height: 36px; padding: 6px 13px; border: 1.5px solid #d1d5db; border-radius: 999px;
  background: #fff; font-size: 12.5px; font-weight: 600; color: #334155; cursor: pointer;
}
.opm-fc.sel { border-color: #b8860b; background: #fef3c7; color: #78350f; font-weight: 700; } /* [MANDATSGOLD] or */
.opm-lbody { flex: 1; overflow-y: auto; padding: 2px 14px calc(16px + env(safe-area-inset-bottom, 0px)); }
.opm-rowi {
  display: flex; align-items: center; gap: 10px; width: 100%;
  min-height: 58px; margin-bottom: 8px; padding: 10px 12px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
  cursor: pointer; text-align: left; color: #94a3b8;
}
.opm-rowi:active { filter: brightness(.97); }
.opm-rowi.st-perdu { opacity: .62; }
.opm-rtx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.opm-rtx b {
  font-size: 14px; font-weight: 700; color: #0f172a;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.opm-rtx i { font-style: normal; font-size: 12px; color: #64748b; }
.opm-badge {
  flex: 0 0 auto; font-size: 10.5px; font-weight: 700; letter-spacing: .3px;
  text-transform: uppercase; border-radius: 999px; padding: 5px 9px;
}
.opm-badge.st-actif { background: #b8860b; color: #fff; } /* [MANDATSGOLD] bronze */
.opm-badge.st-compromis { background: #fef3c7; color: #78350f; border: 1px solid #fcd34d; } /* [MANDATSGOLD] or */
.opm-badge.st-vendu { background: #0f172a; color: #fff; }
.opm-badge.st-perdu { background: #e2e8f0; color: #475569; }
.opm-empty {
  margin: 18px 2px; padding: 16px; background: #fff; border: 1px dashed #cbd5e1;
  border-radius: 14px; font-size: 13px; color: #64748b; text-align: center; line-height: 1.5;
}

/* -------------------------------------------------------- bloc Ma production
   (vit DANS .ops-valo-sec de l'écran Statistiques — le h3 hérite du style valo) */
.opm-prod-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opm-prod-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
  padding: 11px 12px; display: flex; flex-direction: column; gap: 2px;
}
.opm-prod-card b { font-size: 20px; font-weight: 800; letter-spacing: -.5px; color: #0f172a; }
.opm-prod-card span { font-size: 11.5px; color: #64748b; line-height: 1.35; }
.opm-prod-card.main { background: #b8860b; border-color: #94700d; grid-column: 1 / -1; } /* [MANDATSGOLD] bronze */
.opm-prod-card.main b { color: #fff; font-size: 26px; }
.opm-prod-card.main span { color: #fff; opacity: .92; }
.opm-prod-k {
  font-size: 11px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase;
  color: #64748b; margin: 14px 0 8px; display: flex; align-items: center; gap: 6px;
}
.opm-prod-orig { display: flex; flex-direction: column; gap: 6px; }
.opm-po-row { display: flex; align-items: center; gap: 8px; }
.opm-po-row .nm { flex: 0 0 96px; font-size: 12px; font-weight: 600; color: #334155; }
.opm-po-row .bar { flex: 1; height: 8px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.opm-po-row .bar i { display: block; height: 100%; border-radius: 999px; background: #b8860b; } /* [MANDATSGOLD] bronze */
.opm-po-row .ct { flex: 0 0 auto; font-size: 11.5px; font-weight: 700; color: #64748b; }
.opm-po-row.quiet .bar i { background: #cbd5e1; }   /* origine « ? » (backfill) : grise, pas une victoire terrain */
.opm-po-row.quiet .nm { color: #94a3b8; }

/* --------------------------------------------------------------- chargement */
.opm-load { display: grid; place-items: center; padding: 22px 0; }
.opm-spin {
  width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid #e2e8f0; border-top-color: #b8860b; /* [MANDATSGOLD] bronze */
  animation: opmspin .8s linear infinite;
}
@keyframes opmspin { to { transform: rotate(360deg); } }

/* [FICHEMANDAT 2026-06-15] « Voir le bien » : action SECONDAIRE (outline encre),
   pour ne pas concurrencer l'action principale verte/bronze. 100 % additif. */
.opm-save.opm-voir {
  margin-top: 12px;
  background: #fff;
  color: #0f172a;
  border: 1.5px solid #cbd5e1;
}
.opm-save.opm-voir:active { filter: brightness(.97); }
