/* police Nunito servie par le logiciel lui-meme (meme ecriture partout, meme sans Google) */
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 200 400; font-display: swap; src: url('../fonts/nunito/Nunito-Regular-web.ttf') format('truetype'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 500 600; font-display: swap; src: url('../fonts/nunito/Nunito-SemiBold-web.ttf') format('truetype'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 700 900; font-display: swap; src: url('../fonts/nunito/Nunito-Bold-web.ttf') format('truetype'); }

/* Afritech - version telephone (ecrans de moins de 768 px). Rien ne change sur l'ordinateur. */
/* barre bleue de chargement : quoi qu'il arrive, elle s efface toute seule apres 1,6 seconde */
@keyframes af-np-off { to { opacity: 0; visibility: hidden; } }
#nprogress { animation: af-np-off .25s ease 1.6s forwards; pointer-events: none; }
/* ---------- mode hors connexion ---------- */
.afo-band { position: fixed; left: 0; right: 0; top: 0; z-index: 2000; height: 46px; box-sizing: border-box; background: #1f2937; color: #fff; font: 600 13px Nunito, sans-serif;
  display: flex; align-items: center; gap: 9px; padding: 0 14px; cursor: pointer; }
.afo-band.afo-sync { background: #1d4ed8; } .afo-band.afo-warnb { background: #b45309; }
.afo-band .dot { width: 9px; height: 9px; border-radius: 50%; background: #f59e0b; flex: none; }
.afo-band.afo-sync .dot { background: #93c5fd; } .afo-band.afo-warnb .dot { background: #fde68a; }
.afo-band .tx { min-width: 0; line-height: 1.2; }
.afo-band .tx b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.afo-band small { display: block; font-weight: 500; color: #cbd5e1; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.afo-band .sp { flex: 1; }
.afo-band .pill { background: #f59e0b; color: #1f2937; border-radius: 10px; padding: 2px 9px; font-weight: 800; font-size: 12px; white-space: nowrap; flex: none; }
body.afo-on .compact-layout { margin-top: 46px; height: calc(100vh - 46px); }
body.afo-on .loadscreen { top: 46px; }
.afo-warn { display: inline-block; margin-top: 3px; background: #fee2e2; color: #b91c1c; border-radius: 6px; padding: 1px 6px; font: 700 10.5px Nunito, sans-serif; }
.afo-modal { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 2100; display: flex; align-items: center; justify-content: center; padding: 12px; }
.afo-sheet { background: #fff; width: 100%; max-width: 480px; max-height: 88vh; overflow-y: auto; border-radius: 20px; padding: 22px 20px; font-family: Nunito, sans-serif; color: #0f172a; box-sizing: border-box; }
.afo-sheet h3 { font-size: 19px; font-weight: 700; margin: 0 0 8px; }
.afo-sheet p { color: #475569; font-size: 14px; margin: 0 0 14px; line-height: 1.45; }
.afo-ic { width: 52px; height: 52px; border-radius: 16px; background: #fff7ed; color: #ea580c; display: flex; align-items: center; justify-content: center; font-size: 26px; margin-bottom: 12px; }
.afo-box { background: #f8fafc; border: 1px solid #e8edf3; border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; font-size: 13.5px; }
.afo-box div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; } .afo-box b { font-weight: 700; text-align: right; }
.afo-btn { display: block; width: 100%; border: 0; border-radius: 12px; padding: 13px; font: 700 15px Nunito, sans-serif; background: #2563eb; color: #fff !important; margin-top: 8px; cursor: pointer; box-sizing: border-box; }
.afo-btn.sec { background: #f1f5f9; color: #0f172a !important; }
.afo-row { background: #fff; border: 1px solid #e8edf3; border-radius: 13px; padding: 10px 12px; margin-bottom: 8px; }
.afo-row .l1 { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; font-size: 14px; }
.afo-row .l2 { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: #64748b; font-size: 12.5px; margin-top: 3px; }
.afo-tag { border-radius: 10px; padding: 2px 9px; font-weight: 700; font-size: 11.5px; white-space: nowrap; }
.afo-wait { background: #fff7ed; color: #c2410c; } .afo-sent { background: #dcfce7; color: #15803d; } .afo-err { background: #fee2e2; color: #b91c1c; }
.afo-errt { color: #b91c1c; font-size: 12.5px; margin-top: 6px; }
.afo-acts { display: flex; gap: 8px; margin-top: 8px; } .afo-acts button { flex: 1; border: 1px solid #e2e8f0; background: #fff; border-radius: 9px; padding: 7px; font: 700 13px Nunito, sans-serif; }
.afo-acts button.d { color: #b91c1c; border-color: #fecaca; }
.afo-note { margin: 0 0 10px; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; border-radius: 10px; padding: 8px 11px; font: 600 12.5px Nunito, sans-serif; }
.afo-sub { margin: 14px 0 8px; color: #64748b; font: 700 12px Nunito, sans-serif; text-transform: uppercase; letter-spacing: .5px; }
.afo-toast { position: fixed; right: 16px; top: 62px; z-index: 2200; width: 360px; max-width: calc(100vw - 20px); background: #15803d; color: #fff; border-radius: 14px; padding: 12px 14px; font: 600 13.5px Nunito, sans-serif; box-shadow: 0 10px 30px rgba(0,0,0,.2); transition: opacity .4s; }
.afo-toast small { display: block; font-weight: 500; opacity: .92; margin-top: 2px; }
@media screen and (max-width: 767px) {
  .afo-modal { align-items: flex-end; padding: 0; }
  .afo-sheet { border-radius: 20px 20px 0 0; max-width: none; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .afo-toast { left: 10px; right: 10px; width: auto; top: 56px; }
}
.af-mnav, .af-pos-bar, .af-msearch-btn { display: none; }

@media screen and (max-width: 767px) {
  /* ---------- barre du bas ---------- */
  .af-mnav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040;
    background: #fff; border-top: 1px solid #e8edf3; box-shadow: 0 -4px 18px rgba(15, 23, 42, .06);
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
  }
  .af-mnav a, .af-mnav button {
    flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    padding: 6px 2px; border: 0; background: none; color: #64748b; font-size: 11px; font-weight: 600; text-decoration: none; border-radius: 12px;
  }
  .af-mnav svg { width: 22px; height: 22px; }
  .af-mnav .on { color: #2563eb; }
  .af-mnav .af-mnav-sell svg { background: #2563eb; color: #fff; border-radius: 10px; padding: 4px; width: 30px; height: 30px; }
  .af-mnav .af-mnav-sell { color: #2563eb; }
  .layout-content { padding-bottom: calc(66px + env(safe-area-inset-bottom)) !important; }
  .layout-content .footer, .layout-content footer, .main-footer, .layout-content .app-footer { display: none !important; }

  /* ---------- haut de page ---------- */
  .layout-content .layout-header.af-top { padding: 8px 12px; gap: 6px; }
  .af-top-right > a.af-btn-dark { display: none !important; }            /* "Point de vente" : deja dans la barre du bas */
  .af-msearch-btn { display: inline-flex; }
  body.af-msearch-on .af-search {
    display: flex !important; position: fixed; left: 8px; right: 8px; top: 8px; z-index: 1060; max-width: none; width: auto !important; box-sizing: border-box;
    background: #fff; box-shadow: 0 10px 30px rgba(15, 23, 42, .18);
  }
  body.af-msearch-on .af-search input { font-size: 16px; }
  .layout-content .content-section { padding: 12px 12px 0 !important; }
  .breadcrumb h1, .af-hero-head h1 { font-size: 20px !important; }
  .af-hero-head { margin-bottom: 10px; }
  .af-hero-head p { font-size: 12.5px; }
  .separator-breadcrumb { margin-bottom: 12px !important; }

  /* ---------- chiffres : 2 par ligne, plus petits ---------- */
  .af-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px !important; margin-bottom: 12px !important; }
  .af-k { padding: 10px 11px !important; gap: 8px !important; border-radius: 13px !important; }
  .af-k-ic { width: 28px !important; height: 28px !important; border-radius: 8px !important; }
  .af-k-ic svg { width: 15px; height: 15px; }
  .af-k small { font-size: 11px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .af-k b { font-size: 15px !important; }
  .af-k b i { font-size: 10px !important; }
  .af-k em { font-size: 10.5px !important; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  /* ---------- onglets : une ligne qui glisse ---------- */
  .af-tabs { flex-wrap: nowrap !important; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
  .af-tabs::-webkit-scrollbar { display: none; }
  .af-tab { white-space: nowrap; flex: none; }

  /* ---------- listes : chaque ligne devient une petite fiche ---------- */
  .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dt-buttons { display: none !important; }
  .dataTables_wrapper .dataTables_filter { float: none !important; text-align: left !important; width: 100%; margin: 0 0 8px; }
  .dataTables_wrapper .dataTables_filter label { width: 100%; margin: 0; font-size: 0; }
  .dataTables_wrapper .dataTables_filter input { width: 100% !important; margin: 0 !important; font-size: 15px; height: 40px; }
  .dataTables_wrapper .dataTables_info { font-size: 12px; text-align: center; padding-top: 6px !important; }
  .dataTables_wrapper .dataTables_paginate { float: none !important; text-align: center !important; }
  .dataTables_wrapper .dataTables_paginate .paginate_button { padding: 4px 9px !important; min-width: 0 !important; }
  .dataTables_wrapper .dataTables_paginate { white-space: nowrap; overflow: hidden; }
  .dataTables_wrapper .dataTables_paginate a.paginate_button.previous, .dataTables_wrapper .dataTables_paginate a.paginate_button.next,
  .dataTables_wrapper .dataTables_paginate .page-item.previous .page-link, .dataTables_wrapper .dataTables_paginate .page-item.next .page-link { font-size: 0 !important; }
  .dataTables_wrapper .dataTables_paginate a.paginate_button.previous::before, .dataTables_wrapper .dataTables_paginate .page-item.previous .page-link::before { content: '‹'; font-size: 20px; line-height: 1; }
  .dataTables_wrapper .dataTables_paginate a.paginate_button.next::before, .dataTables_wrapper .dataTables_paginate .page-item.next .page-link::before { content: '›'; font-size: 20px; line-height: 1; }
  .dataTables_wrapper .table-responsive, .dataTables_wrapper .dataTables_scrollBody, .table-responsive { overflow: visible !important; }
  table.af-cards { display: flex !important; flex-direction: column; width: 100% !important; min-width: 0 !important; margin: 0 !important; border: 0 !important; background: transparent !important; box-sizing: border-box; }
  table.af-cards tbody { order: 1; height: auto !important; max-height: none !important; } table.af-cards tfoot { order: 2; height: auto !important; }
  table.af-cards, table.af-cards tbody, table.af-cards tr { min-height: 0 !important; }
  table.af-cards .af-empty { display: none !important; }
  table.af-cards tfoot tr { background: #f8fafc !important; }
  table.af-cards thead { display: none !important; }
  table.af-cards tbody, table.af-cards tfoot { display: block; width: 100%; }
  table.af-cards td .form-control, table.af-cards td input { max-width: 150px; }
  table.af-cards tr { display: block; width: 100%; background: #fff !important; border: 1px solid #e8edf3; border-radius: 13px; margin: 0 0 8px; padding: 8px 12px; box-shadow: none !important; }
  table.af-cards tr.af-cards-empty { text-align: center; }
  table.af-cards td, table.af-cards tfoot th {
    display: flex !important; justify-content: space-between; align-items: center; gap: 10px; width: 100% !important;
    padding: 3px 0 !important; border: 0 !important; text-align: right !important; font-size: 13px; white-space: normal !important; background: transparent !important;
  }
  table.af-cards td, table.af-cards tfoot th { flex-wrap: wrap; min-width: 0 !important; }
  table.af-cards td > *:not(.btn):not(.badge) { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
  .content-section table:not(.af-cards) { max-width: 100% !important; }
  .content-section table:not(.af-cards) td, .content-section table:not(.af-cards) th { overflow-wrap: anywhere; }
  table.af-cards td::before, table.af-cards tfoot th::before { content: attr(data-label); color: #64748b; font-size: 11.5px; font-weight: 600; text-align: left; flex: none; max-width: 45%; }
  table.af-cards td[data-label=""]::before, table.af-cards tfoot th[data-label=""]::before { display: none; }
  table.af-cards td[data-label=""] { justify-content: flex-end; }
  table.af-cards td.af-card-main { justify-content: flex-start; text-align: left !important; font-size: 14px; font-weight: 600; padding-bottom: 5px !important; border-bottom: 1px solid #f1f4f8 !important; margin-bottom: 3px; }
  table.af-cards td.af-card-main::before { display: none; }
  table.af-cards td.af-card-main > * { text-align: left; }
  table.af-cards td.dataTables_empty, table.af-cards td[colspan] { justify-content: center; text-align: center !important; }
  table.af-cards td.dataTables_empty::before { display: none; }
  table.af-cards .afr-nm, table.af-cards .af-name { max-width: 230px !important; }
  table.af-cards td > div.d-flex, table.af-cards td .btn-group { flex-wrap: wrap; justify-content: flex-end; }

  /* ---------- fiches (details d'une vente, d'un achat...) : boutons en 2 colonnes ---------- */
  .af-mbtns { display: flex !important; flex-wrap: wrap; gap: 6px; }
  .af-mbtns > .btn, .af-mbtns > a.btn {
    flex: 1 1 calc(50% - 6px); max-width: calc(50% - 3px); margin: 0 !important; display: flex !important; align-items: center; justify-content: center; gap: 5px;
    padding: 9px 6px !important; font-size: 12px !important; white-space: normal; line-height: 1.2; text-align: center; min-width: 0;
  }

  /* ---------- iPhone : pas de zoom automatique quand on touche un champ, pas de glissement sur le cote ---------- */
  html, body { overflow-x: hidden; max-width: 100%; }
  .layout-content { overflow-x: hidden !important; }
  input, select, textarea, .vs__search, .af-search input, .autocomplete input { font-size: 16px !important; }
  input::placeholder { font-size: 14px; }

  /* ---------- formulaires : champs confortables au doigt ---------- */
  .content-section input.form-control, .content-section select.form-control, .content-section .vs__dropdown-toggle { min-height: 42px; font-size: 16px; }
  .modal-dialog { margin: 8px !important; }

  /* ---------- point de vente ---------- */
  .pos-body, .pos-layout { overflow-x: hidden; }
  #main-pos { padding-bottom: 70px !important; }
  .pos-content .pos-card-left { display: flex; flex-direction: column; margin: 0 !important; }
  .pos-content .pos-card-left > .col-lg-4 { order: 2; padding: 0 !important; }
  .pos-content .pos-card-left > .col-lg-8 { order: 1; padding: 0 !important; margin-top: 8px !important; }
  .pos-content .pos-card-left > .col-lg-8 > .row { margin: 0; }
  .pos-content .pos-card-left > .col-lg-8 > .row > .col-12 { padding: 0; }
  .pos-content .pos-card-left > .col-lg-8 > .row > .col-12 > .row { margin: 0; }
  .pos-content .category-card { display: none !important; }
  .pos-content [class*="col-lg-4 col-md-6"] { width: 100%; max-width: 100%; flex: 0 0 100%; padding: 0; }
  .pos-content .product-card { display: flex !important; flex-direction: row; align-items: center; gap: 10px; padding: 8px 10px !important; margin: 0 0 6px !important; border-radius: 12px !important; min-height: 0 !important; height: auto !important; }
  .pos-content .product-card img { width: 46px !important; height: 46px !important; object-fit: cover; border-radius: 9px; flex: none; margin: 0 !important; }
  .pos-content .product-card .card-body { padding: 0 !important; flex: 1; min-width: 0; }
  .pos-content .product-card .card-body p { margin: 0 !important; font-size: 13px; color: #0f172a !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pos-content .product-card .card-body .title { font-size: 14px; }
  .pos-content .product-card .quantity { position: static !important; flex: none; }
  .pos-content .product-card .quantity span { position: static !important; }
  .pos-content .filter-box { margin-top: 10px; }
  .pos-content .card-list-products { margin-top: 10px !important; scroll-margin-top: 70px; }
  .af-pos-bar {
    display: flex; position: fixed; left: 8px; right: 8px; bottom: calc(66px + env(safe-area-inset-bottom)); z-index: 1041;
    align-items: center; gap: 10px; padding: 10px 10px 10px 14px; background: #0f172a; color: #fff; border-radius: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .25); cursor: pointer;
  }
  .af-pos-bar .af-pb-n { font-size: 12px; color: #cbd5e1; }
  .af-pos-bar .af-pb-t { font-size: 16px; font-weight: 700; }
  .af-pos-bar .af-pb-sp { flex: 1; }
  .af-pos-bar button { border: 0; background: #2563eb; color: #fff; font-weight: 700; border-radius: 10px; padding: 9px 16px; font-size: 14px; }
}

/* caisse sur ordinateur : les numeros de pages des categories et marques restent dans leur cadre */
.pos-content .category-card .pagination { flex-wrap: wrap; justify-content: center; row-gap: 4px; }
.pos-content .category-card { overflow: hidden; }

/* visionneuse PDF (application installee sur ordinateur) */
.af-pdfv { position: fixed; inset: 0; z-index: 2100; background: #525659; display: flex; flex-direction: column; }
.af-pdfv-bar { height: 48px; flex: none; background: #323639; color: #fff; display: flex; align-items: center; gap: 10px; padding: 0 12px; font-size: 14px; }
.af-pdfv-t { flex: 1; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .9; }
.af-pdfv-r { display: flex; gap: 6px; }
.af-pdfv-b { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 8px; padding: 6px 12px; font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.af-pdfv-b:hover { background: rgba(255,255,255,.1); }
.af-pdfv-b.main { background: #1a73e8; border-color: #1a73e8; }
.af-pdfv-f { flex: 1; width: 100%; border: 0; background: #525659; }
.af-pdfv.touch .af-pdfv-bar { height: auto; min-height: 52px; padding: env(safe-area-inset-top, 0px) 10px 0; }
.af-pdfv.touch .af-pdfv-b { font-size: 15px; padding: 8px 14px; }
.af-pdfv.touch .af-pdfv-t { font-size: 13px; }
.af-pdfv-pages { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; padding: 10px 8px calc(16px + env(safe-area-inset-bottom, 0px)); display: block; text-align: center; touch-action: pan-x pan-y; }
.af-pdfv-pages.frame { padding: 0; display: flex; }
.af-pdfv-p { display: block; margin: 0 auto 10px; max-width: none; height: auto; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.af-pdfv-z { display: inline-flex; gap: 4px; margin-right: 6px; }
.af-pdfv-b.ic { width: 32px; padding: 6px 0; font-size: 16px; line-height: 1; }
.af-pdfv-b.zl { min-width: 64px; }
.af-pdfv-wait { margin: auto; }
html.af-pdfv-on, html.af-pdfv-on body { overflow: hidden !important; }
@media (max-width: 420px) { .af-pdfv.touch .af-pdfv-t { display: none; } .af-pdfv.touch .af-pdfv-r { margin-left: auto; } }

/* barre d'actions des documents : regroupees, le cachet en icone */
.af-dacts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-start; margin: 4px 0 6px; text-align: left; }
.af-dacts > * { flex: none; margin: 0 !important; }
.af-dmore { position: relative; width: auto !important; min-width: 0 !important; display: inline-flex !important; }
.af-dmore > .af-da { margin: 0 !important; position: static !important; }
.af-da { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 12px; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; color: #1f2937 !important; font-size: 13.5px; font-weight: 500; text-decoration: none !important; cursor: pointer; white-space: nowrap; line-height: 1; }
.af-da:hover { border-color: #c7d2fe; background: #f8faff; }
.af-da svg { width: 16px; height: 16px; flex: none; }
.af-da i { font-size: 16px; }
.af-da.ic { width: 36px; padding: 0; }
.af-da.st { color: #16a34a !important; }
.af-da.wa { color: #15803d !important; }
.af-dg { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border: 1px solid #eef0f3; border-radius: 12px; background: #f8fafc; }
.af-dgl { font-size: 12px; color: #6b7280; margin-right: 2px; white-space: nowrap; }
.af-dg .af-da { height: 30px; border-color: #e5e7eb; }
.af-dg .af-da.ic { width: 30px; }
.af-dmore .dropdown-menu { font-size: 13.5px; }
.af-dmore .dropdown-item i { margin-right: 6px; }
@media screen and (max-width: 767px) {
  .af-dacts { gap: 6px; }
  .af-dacts > .af-da { flex: 1 1 0; min-width: 0; }
  .af-dacts > .af-dmore { flex: none; }
  .af-dg { flex: 1 1 100%; justify-content: flex-end; flex-wrap: wrap; row-gap: 4px; }
  .af-dg .af-dgl { margin-right: auto; font-size: 13px; color: #374151; }
  .af-dg .af-da { height: 34px; }
  .af-dg .af-da.ic { width: 38px; }
}

/* menu « Action » des listes : une ligne par document */
.af-mrow { display: flex; align-items: center; gap: 4px; padding: 5px 8px 5px 14px; }
.af-mrow-l { flex: 1; font-size: 13.5px; color: #374151; white-space: nowrap; margin-right: 8px; }
.af-mrow-b { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 30px; padding: 0 10px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; color: #1f2937 !important; font-size: 13px; text-decoration: none !important; white-space: nowrap; }
.af-mrow-b:hover { border-color: #c7d2fe; background: #f8faff; }
.af-mrow-b.ic { width: 30px; padding: 0; }
.af-mrow-b.st { color: #16a34a !important; }
.af-mrow-b svg { width: 15px; height: 15px; }
.af-mrow-b i { font-size: 15px; }

/* vente au detail : ajout rapide d'une unite */
.af-rt-add { display: inline-block; margin-top: 4px; font-size: 11.5px; color: #6b7280 !important; cursor: pointer; white-space: nowrap; }
.af-rt-add:hover { color: #2563eb !important; text-decoration: underline; }
/* ordinateur : le lien n'apparait qu'au survol de la ligne (liste plus legere) */
@media (hover: hover) and (min-width: 768px) { tr:not(:hover) .af-rt-add { visibility: hidden; } }
@media screen and (max-width: 767px) { .af-rt-add { margin-top: 0; font-size: 12.5px; } }
.af-rq-ov { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.af-rq { background: #fff; border-radius: 16px; width: 100%; max-width: 420px; padding: 18px 20px; box-shadow: 0 20px 50px rgba(15,23,42,.25); }
.af-rq h4 { font-size: 17px; font-weight: 700; margin: 0 0 4px; }
.af-rq p { font-size: 12.5px; color: #6b7280; margin: 0 0 10px; }
.af-rq label { font-size: 12.5px; color: #374151; margin: 10px 0 4px; display: block; }
.af-rq label small { color: #9ca3af; }
.af-rq .form-control { border-radius: 10px; }
.af-rq-eq { margin-top: 10px; font-size: 13px; font-weight: 600; color: #1d4ed8; min-height: 18px; }
.af-rq-err { color: #dc2626; font-size: 12.5px; }
.af-rq-ft { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.af-rq-ft .btn { border-radius: 10px; }
@media (max-width: 576px) { .af-rq-ov { align-items: flex-end; padding: 0; } .af-rq { border-radius: 16px 16px 0 0; max-width: none; } .af-rq .form-control { font-size: 16px; } }

/* barre de recherche produit fixe en haut des formulaires */
.af-sticky-search { position: relative; z-index: 30; background: #fff; padding-top: 10px !important; padding-bottom: 10px !important; margin-top: 0 !important; margin-bottom: 1.25rem !important; }
.af-sticky-search.af-ss-fixed { position: fixed; z-index: 40; box-shadow: 0 6px 14px -10px rgba(15, 23, 42, .35); border-radius: 0 0 12px 12px; }
.af-ss-ph { flex: 0 0 100%; }
.af-sticky-search .autocomplete-result-list { max-height: 50vh; overflow-y: auto; }
/* fenetre ouverte (ex : Nouveau produit) : la barre redevient normale pour que la fenetre passe au-dessus */
.modal-open .af-sticky-search, .modal-open .af-sticky-search.af-ss-fixed { position: static; z-index: auto; }
/* bouton « statut » (tampon Paye / Non paye) + petit choix */
.af-da.sv, .af-mrow-b.sv { color: #2563eb !important; }
.af-da.sv svg { width: 17px; height: 17px; }
.af-svpop { position: fixed; z-index: 3000; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; box-shadow: 0 14px 30px -10px rgba(15,23,42,.30); padding: 5px; min-width: 190px; }
.af-svpop a { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 8px; color: #1f2937 !important; font-size: 14px; text-decoration: none !important; white-space: nowrap; }
.af-svpop a:hover { background: #eff6ff; color: #1d4ed8 !important; }
.af-svpop a svg { width: 17px; height: 17px; color: #2563eb; flex: none; }
.af-svpop a i { color: #16a34a; font-size: 16px; }
