/* CKlean Mobile App V1 — téléphone uniquement. Desktop inchangé. */
.ck-mobile-nav,.ck-mobile-sheet,.ck-mobile-install{display:none}
body:not(.ck-app-authenticated) .ck-mobile-nav,body:not(.ck-app-authenticated) .ck-mobile-sheet{display:none!important}

@media (max-width: 760px){
  :root{--ck-mobile-nav-h:72px;--ck-mobile-safe:env(safe-area-inset-bottom,0px)}
  html,body{overscroll-behavior-y:none}
  body.ck-app-authenticated{padding-bottom:calc(var(--ck-mobile-nav-h) + var(--ck-mobile-safe))!important;background:#0f1012}
  body.ck-app-authenticated #appCard.card{min-height:calc(100dvh - var(--ck-mobile-nav-h) - var(--ck-mobile-safe))!important}

  /* L'ancienne barre d'onglets horizontale prend trop de place sur téléphone. */
  body.ck-app-authenticated #appCard>.ck-main-tabs{display:none!important}

  /* Barre supérieure compacte. */
  body.ck-app-authenticated #appCard>.ck-app-toolbar{
    position:sticky!important;top:0!important;z-index:9000!important;
    min-height:50px!important;padding:6px 9px!important;
    background:rgba(15,16,18,.96)!important;backdrop-filter:blur(18px)!important;
  }
  body.ck-app-authenticated .ck-sync-control{min-width:38px!important;width:38px!important;padding:0!important;justify-content:center!important}
  body.ck-app-authenticated .ck-sync-control span{display:none!important}
  body.ck-app-authenticated #appCard>.panel.active{padding:10px 8px 18px!important}

  /* Touch targets */
  body.ck-app-authenticated button,
  body.ck-app-authenticated input,
  body.ck-app-authenticated select{min-height:42px}
  body.ck-app-authenticated textarea{font-size:16px!important}
  body.ck-app-authenticated input,body.ck-app-authenticated select{font-size:16px!important}

  /* Navigation application */
  .ck-mobile-nav{
    position:fixed;left:0;right:0;bottom:0;z-index:250000;
    height:calc(var(--ck-mobile-nav-h) + var(--ck-mobile-safe));
    padding:7px 6px calc(7px + var(--ck-mobile-safe));
    display:grid;grid-template-columns:repeat(5,1fr);align-items:start;
    background:rgba(13,14,16,.97);border-top:1px solid rgba(255,255,255,.09);
    box-shadow:0 -12px 34px rgba(0,0,0,.34);backdrop-filter:blur(20px)
  }
  .ck-mobile-nav button{
    appearance:none;border:0!important;background:transparent!important;box-shadow:none!important;
    color:#777c86!important;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
    min-width:0!important;min-height:55px!important;padding:4px 2px!important;border-radius:12px!important;font-size:10px!important;font-weight:750!important
  }
  .ck-mobile-nav button svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
  .ck-mobile-nav button.is-active{color:#fff!important}
  .ck-mobile-nav button.is-active:after{content:"";position:absolute;margin-top:51px;width:18px;height:2px;border-radius:3px;background:#e33a47}
  .ck-mobile-nav .ck-mobile-create{position:relative;transform:translateY(-15px)}
  .ck-mobile-nav .ck-mobile-create span:first-child{
    display:grid;place-items:center;width:50px;height:50px;border-radius:17px;
    background:linear-gradient(145deg,#e53846,#a71320);color:#fff;font-size:30px;line-height:1;
    box-shadow:0 11px 28px rgba(194,25,40,.35),inset 0 1px rgba(255,255,255,.18)
  }
  .ck-mobile-nav .ck-mobile-create small{color:#d9dbe0;font-size:9px;font-weight:850}

  /* Bottom sheets */
  .ck-mobile-sheet{
    position:fixed;inset:0;z-index:260000;display:none;align-items:flex-end;
    background:rgba(0,0,0,.58);backdrop-filter:blur(5px);padding:12px 8px calc(12px + env(safe-area-inset-bottom,0px))
  }
  .ck-mobile-sheet.is-open{display:flex}
  .ck-mobile-sheet-card{
    width:100%;max-height:min(78dvh,720px);overflow:auto;border:1px solid rgba(255,255,255,.1);
    border-radius:22px;background:#17191d;box-shadow:0 25px 90px rgba(0,0,0,.56);padding:9px 10px 13px
  }
  .ck-mobile-sheet-grabber{width:44px;height:4px;border-radius:9px;background:#4a4d54;margin:2px auto 12px}
  .ck-mobile-sheet-head{display:flex;align-items:center;justify-content:space-between;padding:0 5px 10px}
  .ck-mobile-sheet-head div span{display:block;color:#e0525f;font-size:8px;font-weight:900;letter-spacing:.13em}
  .ck-mobile-sheet-head h3{margin:3px 0 0;font-size:18px}
  .ck-mobile-sheet-close{width:40px!important;height:40px!important;min-height:40px!important;padding:0!important;border-radius:12px!important;background:#23262c!important}
  .ck-mobile-action-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .ck-mobile-action-grid button,.ck-mobile-more-list button{
    border:1px solid rgba(255,255,255,.075)!important;background:#202329!important;box-shadow:none!important;color:#f2f3f5!important
  }
  .ck-mobile-action-grid button{display:flex;align-items:center;gap:11px;min-height:72px!important;padding:11px!important;text-align:left;border-radius:14px!important}
  .ck-mobile-action-grid button>span:first-child{display:grid;place-items:center;width:35px;height:35px;flex:0 0 auto;border-radius:11px;background:rgba(223,53,69,.12);color:#f06270;font-size:19px}
  .ck-mobile-action-grid b,.ck-mobile-action-grid small{display:block}.ck-mobile-action-grid b{font-size:11px}.ck-mobile-action-grid small{margin-top:3px;color:#858b95;font-size:8px;line-height:1.35}
  .ck-mobile-more-list{display:grid;gap:6px}
  .ck-mobile-more-list button{display:grid;grid-template-columns:36px 1fr auto;align-items:center;gap:10px;min-height:55px!important;padding:7px 10px!important;text-align:left;border-radius:12px!important}
  .ck-mobile-more-list button>span:first-child{font-size:17px;text-align:center}.ck-mobile-more-list b,.ck-mobile-more-list small{display:block}.ck-mobile-more-list b{font-size:11px}.ck-mobile-more-list small{margin-top:2px;color:#7e838d;font-size:8px}.ck-mobile-more-list em{font-style:normal;color:#636973;font-size:18px}
  .ck-mobile-sheet-section{margin:13px 4px 7px;color:#696e77;font-size:8px;font-weight:900;letter-spacing:.12em;text-transform:uppercase}

  /* Modales plus naturelles sur téléphone */
  body.ck-app-authenticated .modal.isOpen{align-items:flex-end!important;padding:0!important}
  body.ck-app-authenticated .modal.isOpen>.modalCard{
    width:100vw!important;max-width:none!important;max-height:94dvh!important;margin:0!important;
    border-radius:20px 20px 0 0!important;padding:14px 12px calc(14px + env(safe-area-inset-bottom,0px))!important
  }
  body.ck-app-authenticated .sheet.isOpen{width:100vw!important;max-width:100vw!important}

  /* Tableaux: scroll horizontal assumé plutôt que colonnes écrasées. */
  body.ck-app-authenticated .tableWrap,body.ck-app-authenticated .table-wrap,body.ck-app-authenticated .ck-table-wrap{overflow-x:auto!important;-webkit-overflow-scrolling:touch}
}

@media (display-mode: standalone) and (max-width:760px){
  body.ck-app-authenticated #appCard>.ck-app-toolbar{padding-top:calc(6px + env(safe-area-inset-top,0px))!important}
}

/* CKlean Mobile V2 — lisibilité + navigation iPhone */
@media (max-width:760px){
  :root{--ck-mobile-text:#f5f6f8;--ck-mobile-muted:#aeb3bd;--ck-mobile-border:rgba(255,255,255,.13)}
  body.ck-app-authenticated{font-size:16px!important;line-height:1.45!important}
  body.ck-app-authenticated #appCard>.ck-app-toolbar{min-height:62px!important;padding:8px 12px!important;gap:8px!important}
  body.ck-app-authenticated #appCard>.panel.active{padding:16px 14px 24px!important}
  body.ck-app-authenticated .hint,body.ck-app-authenticated small,body.ck-app-authenticated p{color:var(--ck-mobile-muted)!important}
  body.ck-app-authenticated .hint{font-size:14px!important;line-height:1.45!important}
  body.ck-app-authenticated h2{font-size:28px!important;line-height:1.15!important}
  body.ck-app-authenticated h3{font-size:22px!important;line-height:1.2!important}
  body.ck-app-authenticated h4{font-size:19px!important;line-height:1.25!important}
  body.ck-app-authenticated button{font-size:15px!important}
  body.ck-app-authenticated input,body.ck-app-authenticated select,body.ck-app-authenticated textarea{font-size:17px!important;color:var(--ck-mobile-text)!important;min-height:50px!important}
  body.ck-app-authenticated label>span,body.ck-app-authenticated .ck-quote-field>span{font-size:14px!important;color:#c2c6ce!important}

  /* Retour : apparaît uniquement quand il y a réellement quelque chose à fermer/revenir. */
  .ck-mobile-back{display:flex!important;align-items:center!important;gap:6px!important;min-height:44px!important;height:44px!important;padding:0 11px!important;border:1px solid var(--ck-mobile-border)!important;border-radius:13px!important;background:#191b1f!important;color:#fff!important;font-weight:800!important;white-space:nowrap}
  .ck-mobile-back[hidden]{display:none!important}.ck-mobile-back .ck-back-arrow{font-size:24px;line-height:1}.ck-mobile-back .ck-back-label{font-size:14px}
  body.ck-app-authenticated .ck-app-toolbar:has(.ck-mobile-back:not([hidden])) .ck-sync-control{display:none!important}
  body.ck-app-authenticated .ck-profile-trigger #profileName{display:none!important}

  /* Pages principales : moins de densité, plus de contraste. */
  body.ck-app-authenticated .ck-clients-page-head,body.ck-app-authenticated .ck-quotes-page-head{gap:14px!important;margin-bottom:18px!important}
  body.ck-app-authenticated .ck-clients-page-head p,body.ck-app-authenticated .ck-quotes-page-head p{font-size:15px!important;line-height:1.45!important}
  body.ck-app-authenticated .ck-client-kpis{grid-template-columns:1fr 1fr!important;gap:10px!important}
  body.ck-app-authenticated .ck-client-kpis button{padding:15px!important;min-height:118px!important}
  body.ck-app-authenticated .ck-client-kpis small{font-size:13px!important} body.ck-app-authenticated .ck-client-kpis strong{font-size:30px!important} body.ck-app-authenticated .ck-client-kpis span{font-size:13px!important;color:var(--ck-mobile-muted)!important}
  body.ck-app-authenticated .ck-client-toolbar{display:grid!important;grid-template-columns:1fr 52px!important;gap:10px!important}
  body.ck-app-authenticated .ck-client-search{min-width:0!important} body.ck-app-authenticated .ck-client-search input{width:100%!important;font-size:16px!important;text-overflow:ellipsis}
  body.ck-app-authenticated .ck-client-smartbar{overflow:hidden!important}.ck-client-filters{overflow-x:auto!important;flex-wrap:nowrap!important;-webkit-overflow-scrolling:touch;padding-bottom:5px!important}.ck-client-filters button{flex:0 0 auto!important;white-space:nowrap!important}
  body.ck-app-authenticated .ck-client-page-size{display:none!important}
  body.ck-app-authenticated .box{border-color:var(--ck-mobile-border)!important}

  /* Les listes doivent se lire comme des cartes, pas comme un tableau PC rétréci. */
  body.ck-app-authenticated #clientsTbl thead,body.ck-app-authenticated #facturesListBox table thead{display:none!important}
  body.ck-app-authenticated #clientsTbl,body.ck-app-authenticated #clientsTbl tbody,body.ck-app-authenticated #facturesListBox table,body.ck-app-authenticated #facturesListBox tbody{display:block!important;width:100%!important}
  body.ck-app-authenticated #clientsTbl tr,body.ck-app-authenticated #facturesListBox tbody tr{display:grid!important;width:auto!important;margin:10px!important;padding:14px!important;border:1px solid var(--ck-mobile-border)!important;border-radius:16px!important;background:#17191d!important;gap:7px!important}
  body.ck-app-authenticated #clientsTbl td,body.ck-app-authenticated #facturesListBox td{display:block!important;width:auto!important;max-width:100%!important;padding:2px 0!important;border:0!important;font-size:15px!important;white-space:normal!important;overflow-wrap:anywhere!important}
  body.ck-app-authenticated #clientsTbl td:first-child,body.ck-app-authenticated #facturesListBox td:first-child{font-size:17px!important;font-weight:800!important;color:#fff!important}
  body.ck-app-authenticated #clientsTbl td:empty,body.ck-app-authenticated #facturesListBox td:empty{display:none!important}

  /* Drawer devis/facture : vrai écran mobile avec en-tête fixe. */
  body.ck-app-authenticated .clientSheet.ck-quote-sheet[aria-hidden="false"],body.ck-app-authenticated .clientSheet.ck-invoice-sheet[aria-hidden="false"]{inset:0!important;width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;border-radius:0!important;padding-bottom:calc(var(--ck-mobile-nav-h) + var(--ck-mobile-safe) + 12px)!important;background:#101113!important;overflow-y:auto!important}
  body.ck-app-authenticated .ck-quote-sheet-top{position:sticky!important;top:0!important;z-index:40!important;padding:calc(8px + env(safe-area-inset-top,0px)) 12px 10px!important;background:rgba(16,17,19,.97)!important;backdrop-filter:blur(18px)!important;border-bottom:1px solid var(--ck-mobile-border)!important}
  body.ck-app-authenticated .ck-quote-sheet-identity{min-width:0!important} body.ck-app-authenticated .ck-quote-sheet-identity>span{display:none!important} body.ck-app-authenticated .ck-quote-sheet-identity h3{font-size:19px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important} body.ck-app-authenticated .ck-quote-sheet-identity p{font-size:12px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  body.ck-app-authenticated .ck-quote-sheet-actions-pro{gap:6px!important}.ck-quote-save-state{display:none!important}
  body.ck-app-authenticated .ck-quote-sheet-actions-pro button{min-height:42px!important;padding:8px 10px!important}.ck-quote-sheet-actions-pro #fBtnReminder,.ck-quote-sheet-actions-pro #fBtnPreviewPdf{font-size:0!important}.ck-quote-sheet-actions-pro #fBtnReminder::first-letter,.ck-quote-sheet-actions-pro #fBtnPreviewPdf::first-letter{font-size:18px!important}
  body.ck-app-authenticated .ck-quote-editor-grid{display:block!important;padding:12px!important}.ck-quote-editor-grid>.sheetBlock{margin-bottom:12px!important;padding:16px!important;border-radius:18px!important}
  body.ck-app-authenticated .ck-quote-field-grid{grid-template-columns:1fr!important;gap:10px!important}
  body.ck-app-authenticated .ck-quote-lines-table{min-width:720px!important}
  body.ck-app-authenticated .ck-quote-totals-bar{padding:0 12px 12px!important}.ck-quote-totals-bar>.sheetBlock{padding:16px!important;border-radius:18px!important}
  body.ck-app-authenticated .ck-invoice-adjustments{display:grid!important;grid-template-columns:1fr!important;gap:12px!important}.ck-invoice-adjustments .ck-quote-discount{display:grid!important;grid-template-columns:76px 92px 1fr!important;align-items:center!important;gap:8px!important}.ck-invoice-adjustments small{font-size:13px!important}
  body.ck-app-authenticated .ck-quote-totals{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important;margin-top:14px!important}.ck-quote-totals>span{padding:10px!important;border:1px solid rgba(255,255,255,.08)!important;border-radius:12px!important}.ck-quote-totals small{font-size:12px!important}.ck-quote-totals b{font-size:18px!important}.ck-quote-totals .is-total{grid-column:1/-1!important}.ck-quote-totals .is-total b{font-size:25px!important}

  /* Barre basse légèrement plus lisible. */
  .ck-mobile-nav button{font-size:12px!important}.ck-mobile-nav .ck-mobile-create small{font-size:11px!important}.ck-mobile-nav button svg{width:24px;height:24px}
}

/* CKlean Mobile V3 — éditeur plein écran + retour fiable */
@media (max-width:760px){
  /* IMPORTANT : les styles desktop centrent les éditeurs avec translate(-50%).
     Sur mobile on annule totalement ce centrage : sinon seule la moitié de l'écran reste visible. */
  body.ck-app-authenticated #devisSheet.ck-quote-sheet,
  body.ck-app-authenticated #factureSheet.ck-invoice-sheet{
    position:fixed!important;
    inset:0!important;
    left:0!important;
    right:0!important;
    top:0!important;
    bottom:0!important;
    width:100vw!important;
    min-width:100vw!important;
    max-width:100vw!important;
    height:100dvh!important;
    min-height:100dvh!important;
    max-height:100dvh!important;
    margin:0!important;
    border:0!important;
    border-radius:0!important;
    transform:none!important;
    opacity:0;
    overflow:hidden!important;
  }
  body.ck-app-authenticated #devisSheet.ck-quote-sheet.isOpen,
  body.ck-app-authenticated #factureSheet.ck-invoice-sheet.isOpen{
    transform:none!important;
    opacity:1!important;
    pointer-events:auto!important;
  }

  /* Le bouton retour fait partie de l'éditeur : impossible qu'il se retrouve derrière. */
  .ck-editor-mobile-back{
    display:flex!important;
    flex:0 0 auto!important;
    align-items:center!important;
    gap:5px!important;
    min-width:auto!important;
    width:auto!important;
    min-height:42px!important;
    height:42px!important;
    padding:0 10px!important;
    margin:0 4px 0 0!important;
    border:1px solid rgba(255,255,255,.15)!important;
    border-radius:12px!important;
    background:#1b1d21!important;
    color:#fff!important;
    font-size:14px!important;
    font-weight:850!important;
  }
  .ck-editor-mobile-back span{font-size:25px!important;line-height:1!important}
  .ck-editor-mobile-back b{font-size:14px!important;white-space:nowrap!important}

  /* En-tête réellement utilisable sur iPhone. */
  body.ck-app-authenticated #devisSheet .ck-quote-sheet-top,
  body.ck-app-authenticated #factureSheet .ck-quote-sheet-top{
    display:grid!important;
    grid-template-columns:auto minmax(0,1fr) auto!important;
    align-items:center!important;
    gap:7px!important;
    min-height:64px!important;
    padding:calc(8px + env(safe-area-inset-top,0px)) 8px 8px!important;
  }
  body.ck-app-authenticated #devisSheet .ck-quote-sheet-identity,
  body.ck-app-authenticated #factureSheet .ck-quote-sheet-identity{min-width:0!important}
  body.ck-app-authenticated #devisSheet .ck-quote-sheet-identity>span,
  body.ck-app-authenticated #factureSheet .ck-quote-sheet-identity>span{display:none!important}
  body.ck-app-authenticated #devisSheet .ck-quote-sheet-identity h3,
  body.ck-app-authenticated #factureSheet .ck-quote-sheet-identity h3{
    margin:0!important;
    font-size:16px!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }
  body.ck-app-authenticated #devisSheet .ck-quote-sheet-identity p,
  body.ck-app-authenticated #devisSheet .ck-quote-sheet-identity small,
  body.ck-app-authenticated #factureSheet .ck-quote-sheet-identity p,
  body.ck-app-authenticated #factureSheet .ck-quote-sheet-identity small{display:none!important}

  /* On garde seulement les actions essentielles dans la barre haute mobile. */
  body.ck-app-authenticated #devisSheet .ck-quote-sheet-actions,
  body.ck-app-authenticated #factureSheet .ck-quote-sheet-actions{display:flex!important;gap:5px!important;min-width:auto!important}
  body.ck-app-authenticated #devisSheet .ck-quote-sheet-actions>button:not(.sheetClose):not(#dBtnMail):not(#dBtnPreviewPdf),
  body.ck-app-authenticated #factureSheet .ck-quote-sheet-actions>button:not(.sheetClose):not(#fBtnMail):not(#fBtnPreviewPdf):not(#fBtnReminder){display:none!important}
  body.ck-app-authenticated #devisSheet .sheetClose,
  body.ck-app-authenticated #factureSheet .sheetClose{
    display:grid!important;place-items:center!important;width:42px!important;height:42px!important;min-height:42px!important;padding:0!important;font-size:18px!important
  }

  /* Contenu : une seule colonne et largeur strictement contenue dans l'iPhone. */
  body.ck-app-authenticated #devisSheet .ck-quote-editor-grid,
  body.ck-app-authenticated #factureSheet .ck-quote-editor-grid{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    padding:10px!important;
  }
  body.ck-app-authenticated #devisSheet .ck-quote-editor-grid>*,
  body.ck-app-authenticated #factureSheet .ck-quote-editor-grid>*{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }
  body.ck-app-authenticated #devisSheet .ck-quote-lines-wrap,
  body.ck-app-authenticated #factureSheet .ck-quote-lines-wrap{overflow-x:auto!important;-webkit-overflow-scrolling:touch!important}

  /* Quand un document est ouvert, la barre de navigation principale ne doit pas passer au-dessus. */
  body.ck-document-editor-open #ckMobileNav{display:none!important}
  body.ck-document-editor-open #ckMobileBack{display:none!important}
}

/* =====================================================================
   CKlean Mobile V4 — vraie édition mobile, toutes les fonctions conservées
   Desktop inchangé : tout ce bloc est téléphone uniquement.
   ===================================================================== */
@media (max-width:760px){
  :root{
    --ckm-bg:#0f1012;--ckm-card:#17191d;--ckm-card2:#1d2025;--ckm-border:rgba(255,255,255,.11);
    --ckm-muted:#a7abb4;--ckm-red:#e23848;--ckm-nav:76px;
  }

  /* Lisibilité générale */
  body.ck-app-authenticated{font-size:16px!important}
  body.ck-app-authenticated .hint,
  body.ck-app-authenticated small{line-height:1.38}
  body.ck-app-authenticated input,
  body.ck-app-authenticated select,
  body.ck-app-authenticated textarea{font-size:16px!important}
  body.ck-app-authenticated .panel.active{overflow-x:hidden!important}
  body.ck-app-authenticated .box{max-width:100%!important;box-sizing:border-box!important}

  /* Pages principales : titres et actions empilés proprement */
  body.ck-app-authenticated .ck-quotes-page-head,
  body.ck-app-authenticated .ck-planning-head,
  body.ck-app-authenticated .clientsHead,
  body.ck-app-authenticated .co-premium-head{
    display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:14px!important
  }
  body.ck-app-authenticated .ck-quotes-page-head h2,
  body.ck-app-authenticated .ck-planning-head h2{font-size:31px!important;line-height:1.05!important}
  body.ck-app-authenticated .ck-quotes-page-head p,
  body.ck-app-authenticated .ck-planning-head p{font-size:15px!important;color:#a6aab2!important}
  body.ck-app-authenticated .ck-primary-action{width:100%!important;justify-content:center!important;min-height:52px!important;font-size:16px!important}

  /* KPI : lisibles sans écraser les montants */
  body.ck-app-authenticated .ck-quotes-kpis,
  body.ck-app-authenticated .ck-planning-kpis,
  body.ck-app-authenticated .clientKpis{grid-template-columns:1fr 1fr!important;gap:10px!important}
  body.ck-app-authenticated .ck-quotes-kpis>*{min-width:0!important;padding:14px!important}
  body.ck-app-authenticated .ck-quotes-kpis strong{font-size:20px!important;overflow-wrap:anywhere!important}
  body.ck-app-authenticated .ck-quotes-kpis small{font-size:12px!important}
  body.ck-app-authenticated .ck-quotes-kpis span{font-size:11px!important}

  /* Recherche + toolbar */
  body.ck-app-authenticated .ck-quotes-toolbar,
  body.ck-app-authenticated .ck-invoice-toolbar{display:grid!important;grid-template-columns:minmax(0,1fr) 52px!important;gap:9px!important}
  body.ck-app-authenticated .ck-quotes-toolbar .ck-quote-search{min-width:0!important;width:100%!important}
  body.ck-app-authenticated .ck-quotes-toolbar #fBtnBank{grid-column:1/-1!important;width:100%!important}
  body.ck-app-authenticated .ck-quote-search input{min-width:0!important;width:100%!important;font-size:16px!important}

  /* Filtres : scroll horizontal tactile, pas texte coupé */
  body.ck-app-authenticated .ck-quote-filter-row{display:block!important;overflow:hidden!important}
  body.ck-app-authenticated .ck-quote-status-filters{display:flex!important;overflow-x:auto!important;gap:8px!important;padding:3px 2px 8px!important;-webkit-overflow-scrolling:touch;scrollbar-width:none}
  body.ck-app-authenticated .ck-quote-status-filters::-webkit-scrollbar{display:none}
  body.ck-app-authenticated .ck-quote-status-filters button{flex:0 0 auto!important;white-space:nowrap!important;font-size:14px!important;min-height:44px!important}

  /* Listes Devis / Factures : vraies cartes mobiles */
  body.ck-app-authenticated #devisTbody,
  body.ck-app-authenticated #facturesTbody{display:block!important;width:100%!important}
  body.ck-app-authenticated #devisTbody tr,
  body.ck-app-authenticated #facturesTbody tr{
    position:relative!important;display:grid!important;grid-template-columns:1fr auto!important;gap:8px 12px!important;
    margin:10px 8px!important;padding:16px!important;background:var(--ckm-card)!important;border:1px solid var(--ckm-border)!important;border-radius:17px!important
  }
  body.ck-app-authenticated #devisTbody td,
  body.ck-app-authenticated #facturesTbody td{display:block!important;width:auto!important;padding:0!important;border:0!important;min-width:0!important;font-size:14px!important}
  body.ck-app-authenticated #devisTbody td:nth-child(1),body.ck-app-authenticated #facturesTbody td:nth-child(1){grid-column:1/2}
  body.ck-app-authenticated #devisTbody td:nth-child(2),body.ck-app-authenticated #facturesTbody td:nth-child(2){grid-column:1/2}
  body.ck-app-authenticated #devisTbody td:nth-child(3),body.ck-app-authenticated #facturesTbody td:nth-child(3){grid-column:1/2}
  body.ck-app-authenticated #devisTbody td:nth-child(4),body.ck-app-authenticated #facturesTbody td:nth-child(4){grid-column:1/2}
  body.ck-app-authenticated #devisTbody td:nth-child(5),body.ck-app-authenticated #facturesTbody td:nth-child(5){grid-column:2/3;grid-row:1;font-size:19px!important;font-weight:900!important;text-align:right}
  body.ck-app-authenticated #devisTbody td:nth-child(6),body.ck-app-authenticated #facturesTbody td:nth-child(6){grid-column:2/3;grid-row:2/5;display:flex!important;align-items:center!important;justify-content:flex-end!important}
  body.ck-app-authenticated .ck-quote-doc-cell b{font-size:17px!important}.ck-quote-doc-cell small{font-size:12px!important}
  body.ck-app-authenticated .ck-quote-client-cell b{font-size:15px!important}.ck-quote-client-cell small{font-size:12px!important}

  /* Création depuis devis : une colonne */
  body.ck-app-authenticated .ck-invoice-from-quote{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;padding:16px!important}
  body.ck-app-authenticated .ck-invoice-from-quote select,
  body.ck-app-authenticated .ck-invoice-from-quote button{width:100%!important;min-width:0!important}

  /* ================= EDITEUR DEVIS / FACTURE ================= */
  body.ck-document-editor-open{overflow:hidden!important;padding-bottom:0!important}
  body.ck-document-editor-open #appCard>.ck-app-toolbar{display:none!important}

  body.ck-app-authenticated #devisSheet,
  body.ck-app-authenticated #factureSheet{background:var(--ckm-bg)!important;padding:0!important}

  /* Header compact : Retour + numéro + fermeture. Les autres actions sont dans le dock. */
  body.ck-app-authenticated #devisSheet .ck-quote-sheet-top,
  body.ck-app-authenticated #factureSheet .ck-quote-sheet-top{
    position:sticky!important;top:0!important;z-index:120!important;
    grid-template-columns:auto minmax(0,1fr) auto!important;gap:8px!important;
    min-height:64px!important;padding:calc(8px + env(safe-area-inset-top,0px)) 10px 8px!important;
    background:rgba(15,16,18,.98)!important;border-bottom:1px solid var(--ckm-border)!important
  }
  body.ck-app-authenticated #devisSheet .ck-quote-sheet-actions-pro,
  body.ck-app-authenticated #factureSheet .ck-quote-sheet-actions-pro{display:flex!important;align-items:center!important;gap:0!important}
  body.ck-app-authenticated #devisSheet .ck-quote-sheet-actions-pro>*:not(.sheetClose),
  body.ck-app-authenticated #factureSheet .ck-quote-sheet-actions-pro>*:not(.sheetClose){display:none!important}
  body.ck-app-authenticated #devisSheet .sheetClose,
  body.ck-app-authenticated #factureSheet .sheetClose{width:44px!important;height:44px!important;border-radius:13px!important}
  body.ck-app-authenticated #devisSheet .ck-quote-sheet-identity h3,
  body.ck-app-authenticated #factureSheet .ck-quote-sheet-identity h3{font-size:19px!important;text-align:center!important}
  .ck-editor-mobile-back{height:44px!important;min-height:44px!important;padding:0 12px!important;font-size:15px!important}

  /* Navigation interne Lignes / Infos / Totaux */
  .ck-mobile-editor-sections{
    position:sticky;top:64px;z-index:110;display:grid;grid-template-columns:repeat(3,1fr);gap:6px;
    padding:8px 10px;background:rgba(15,16,18,.97);border-bottom:1px solid var(--ckm-border);backdrop-filter:blur(16px)
  }
  .ck-mobile-editor-sections button{
    min-height:40px!important;padding:7px!important;border:1px solid var(--ckm-border)!important;border-radius:11px!important;
    background:#17191d!important;color:#9da2ac!important;font-size:13px!important;font-weight:800!important
  }
  .ck-mobile-editor-sections button.is-active{background:rgba(226,56,72,.14)!important;border-color:rgba(226,56,72,.55)!important;color:#fff!important}

  /* Ordre mobile : lignes d'abord, infos ensuite, totaux en bas */
  body.ck-app-authenticated #devisSheet .ck-quote-editor-grid,
  body.ck-app-authenticated #factureSheet .ck-quote-editor-grid{
    display:flex!important;flex-direction:column!important;gap:12px!important;padding:12px 10px 112px!important;overflow:visible!important
  }
  body.ck-app-authenticated #devisSheet .ck-quote-lines-card,
  body.ck-app-authenticated #factureSheet .ck-quote-lines-card{order:1!important}
  body.ck-app-authenticated #devisSheet .ck-quote-context-card,
  body.ck-app-authenticated #factureSheet .ck-quote-context-card{order:2!important}
  body.ck-app-authenticated #devisSheet .ck-quote-totals-bar,
  body.ck-app-authenticated #factureSheet .ck-quote-totals-bar{padding:0 10px 120px!important}

  /* Studio : titre + ajout principal. Les commandes PC restent fonctionnelles via dock/sheet V4. */
  body.ck-app-authenticated #devisSheet .ck-quote-studio-bar,
  body.ck-app-authenticated #factureSheet .ck-quote-studio-bar{display:block!important;padding:0 0 12px!important}
  body.ck-app-authenticated #devisSheet .ck-quote-studio-title h4,
  body.ck-app-authenticated #factureSheet .ck-quote-studio-title h4{font-size:22px!important;margin:3px 0 0!important}
  body.ck-app-authenticated #devisSheet .ck-quote-studio-actions-pro,
  body.ck-app-authenticated #factureSheet .ck-quote-studio-actions-pro{display:none!important}
  body.ck-app-authenticated .ck-quote-lines-help{display:block!important;font-size:13px!important;color:#a4a9b2!important;margin:0 0 12px!important}

  /* Plus de tableau horizontal : chaque ligne devient une carte éditable. */
  body.ck-app-authenticated #devisSheet .ck-quote-lines-wrap,
  body.ck-app-authenticated #factureSheet .ck-quote-lines-wrap{overflow:visible!important;width:100%!important}
  body.ck-app-authenticated #devisSheet .ck-quote-lines-table,
  body.ck-app-authenticated #factureSheet .ck-quote-lines-table{display:block!important;width:100%!important;min-width:0!important}
  body.ck-app-authenticated #devisSheet .ck-quote-lines-table thead,
  body.ck-app-authenticated #factureSheet .ck-quote-lines-table thead{display:none!important}
  body.ck-app-authenticated #linesBody,
  body.ck-app-authenticated #fLinesBody{display:grid!important;width:100%!important;gap:11px!important}
  body.ck-app-authenticated #linesBody tr,
  body.ck-app-authenticated #fLinesBody tr{
    position:relative!important;display:grid!important;grid-template-columns:1fr 1fr 1fr!important;gap:10px!important;
    width:100%!important;min-width:0!important;margin:0!important;padding:14px!important;box-sizing:border-box!important;
    border:1px solid var(--ckm-border)!important;border-radius:16px!important;background:#17191d!important;overflow:hidden!important
  }
  body.ck-app-authenticated #linesBody tr::before,
  body.ck-app-authenticated #fLinesBody tr::before{
    content:"Ligne " var(--mobile-line-index);position:absolute;right:12px;top:10px;color:#666c76;font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.08em
  }
  body.ck-app-authenticated #linesBody td,
  body.ck-app-authenticated #fLinesBody td{display:block!important;width:auto!important;min-width:0!important;max-width:100%!important;padding:0!important;border:0!important}
  body.ck-app-authenticated #linesBody td::before,
  body.ck-app-authenticated #fLinesBody td::before{content:attr(data-mobile-label);display:block;margin:0 0 5px;color:#9297a1;font-size:11px;font-weight:800}
  body.ck-app-authenticated #linesBody td:nth-child(1),body.ck-app-authenticated #fLinesBody td:nth-child(1){grid-column:1/-1;width:42px!important}
  body.ck-app-authenticated #linesBody td:nth-child(1)::before,body.ck-app-authenticated #fLinesBody td:nth-child(1)::before{display:none}
  body.ck-app-authenticated #linesBody td:nth-child(2),body.ck-app-authenticated #fLinesBody td:nth-child(2){grid-column:1/-1!important}
  body.ck-app-authenticated #linesBody td:nth-child(3),body.ck-app-authenticated #fLinesBody td:nth-child(3){grid-column:1/2!important}
  body.ck-app-authenticated #linesBody td:nth-child(4),body.ck-app-authenticated #fLinesBody td:nth-child(4){grid-column:2/3!important}
  body.ck-app-authenticated #linesBody td:nth-child(5),body.ck-app-authenticated #fLinesBody td:nth-child(5){grid-column:3/4!important}
  body.ck-app-authenticated #linesBody td:nth-child(6),body.ck-app-authenticated #fLinesBody td:nth-child(6){grid-column:1/2!important;align-self:end!important;font-size:18px!important;font-weight:900!important}
  body.ck-app-authenticated #linesBody td:nth-child(7),body.ck-app-authenticated #fLinesBody td:nth-child(7){grid-column:2/4!important;align-self:end!important}
  body.ck-app-authenticated #linesBody input,body.ck-app-authenticated #fLinesBody input,
  body.ck-app-authenticated #linesBody select,body.ck-app-authenticated #fLinesBody select{
    width:100%!important;min-width:0!important;box-sizing:border-box!important;min-height:48px!important;padding:10px!important;border-radius:11px!important;font-size:16px!important
  }
  body.ck-app-authenticated .ck-rich-line{display:block!important;width:100%!important}
  body.ck-app-authenticated .ck-rich-description{
    min-height:76px!important;width:100%!important;box-sizing:border-box!important;padding:12px!important;border:1px solid var(--ckm-border)!important;
    border-radius:12px!important;background:#111317!important;color:#f1f2f4!important;font-size:16px!important;line-height:1.45!important
  }
  body.ck-app-authenticated .ck-rich-toolbar{display:flex!important;opacity:1!important;gap:7px!important;margin:8px 0 0!important}
  body.ck-app-authenticated .ck-rich-toolbar button{width:40px!important;height:38px!important;min-height:38px!important;border:1px solid var(--ckm-border)!important;background:#22252b!important;font-size:14px!important}
  body.ck-app-authenticated .dragHandle{width:42px!important;height:36px!important;min-height:36px!important;border-radius:10px!important;background:#25282e!important;color:#aeb3bc!important}
  body.ck-app-authenticated .ck-line-actions{display:flex!important;justify-content:flex-end!important;gap:6px!important;flex-wrap:wrap!important}
  body.ck-app-authenticated .ck-line-actions button{min-width:40px!important;min-height:40px!important;font-size:15px!important}

  /* Titres / textes / sous-totaux restent de belles cartes. */
  body.ck-app-authenticated #linesBody tr.is-title,
  body.ck-app-authenticated #fLinesBody tr.is-title,
  body.ck-app-authenticated #linesBody tr.ck-quote-special-row,
  body.ck-app-authenticated #fLinesBody tr.ck-quote-note-row,
  body.ck-app-authenticated #fLinesBody tr.ck-quote-subtotal-row,
  body.ck-app-authenticated #fLinesBody tr.ck-quote-pagebreak-row{display:block!important;padding:14px!important}
  body.ck-app-authenticated #linesBody tr.is-title::before,
  body.ck-app-authenticated #fLinesBody tr.is-title::before,
  body.ck-app-authenticated #linesBody tr.ck-quote-special-row::before,
  body.ck-app-authenticated #fLinesBody tr.ck-quote-note-row::before,
  body.ck-app-authenticated #fLinesBody tr.ck-quote-subtotal-row::before,
  body.ck-app-authenticated #fLinesBody tr.ck-quote-pagebreak-row::before{display:none!important}
  body.ck-app-authenticated #linesBody tr.is-title>td,
  body.ck-app-authenticated #fLinesBody tr.is-title>td,
  body.ck-app-authenticated #linesBody tr.ck-quote-special-row>td,
  body.ck-app-authenticated #fLinesBody tr.ck-quote-note-row>td,
  body.ck-app-authenticated #fLinesBody tr.ck-quote-subtotal-row>td,
  body.ck-app-authenticated #fLinesBody tr.ck-quote-pagebreak-row>td{display:block!important;width:100%!important;margin:0 0 8px!important}
  body.ck-app-authenticated .ck-quote-section-band{display:grid!important;grid-template-columns:auto 1fr!important;gap:9px!important;align-items:start!important;padding:0!important}
  body.ck-app-authenticated .ck-quote-section-band .ck-rich-line{grid-column:1/-1!important}
  body.ck-app-authenticated .ck-quote-section-count{grid-column:1/-1!important;font-size:12px!important}
  body.ck-app-authenticated .ck-quote-section-actions{grid-column:1/-1!important;justify-content:flex-end!important}

  /* Infos document */
  body.ck-app-authenticated #devisSheet .ck-quote-context-card,
  body.ck-app-authenticated #factureSheet .ck-quote-context-card{padding:16px!important;border-radius:17px!important}
  body.ck-app-authenticated .ck-quote-card-head{display:flex!important;align-items:center!important;gap:10px!important}
  body.ck-app-authenticated .ck-quote-card-head h4{font-size:21px!important}
  body.ck-app-authenticated .ck-quote-field{display:block!important;margin-top:12px!important}
  body.ck-app-authenticated .ck-quote-field>span{display:block!important;margin-bottom:6px!important;font-size:13px!important;color:#b1b5bd!important;font-weight:800!important}
  body.ck-app-authenticated .ck-quote-field input,
  body.ck-app-authenticated .ck-quote-field select,
  body.ck-app-authenticated .ck-quote-field textarea{width:100%!important;min-height:48px!important;box-sizing:border-box!important;border-radius:12px!important}

  /* Totaux */
  body.ck-app-authenticated .ck-quote-totals-bar>.sheetBlock{padding:16px!important;border-radius:17px!important}
  body.ck-app-authenticated .ck-quote-discount{display:grid!important;grid-template-columns:1fr 92px 1fr!important;gap:8px!important;align-items:center!important}
  body.ck-app-authenticated .ck-quote-discount>span{font-size:14px!important;font-weight:800!important}
  body.ck-app-authenticated .ck-quote-discount select,
  body.ck-app-authenticated .ck-quote-discount input{width:100%!important;min-width:0!important}
  body.ck-app-authenticated .ck-quote-totals{grid-template-columns:1fr 1fr!important;gap:9px!important}
  body.ck-app-authenticated .ck-quote-totals>span{padding:12px!important;background:#191b20!important}
  body.ck-app-authenticated .ck-quote-totals small{font-size:12px!important;color:#a9adb6!important}
  body.ck-app-authenticated .ck-quote-totals b{font-size:20px!important}
  body.ck-app-authenticated .ck-quote-totals .is-total b{font-size:29px!important}

  /* Dock d'édition fixe : accès permanent aux actions importantes */
  .ck-mobile-editor-dock{
    position:fixed!important;left:0;right:0;bottom:0;z-index:150000!important;
    display:grid!important;grid-template-columns:repeat(4,1fr)!important;gap:5px!important;
    padding:8px 8px calc(8px + env(safe-area-inset-bottom,0px))!important;
    background:rgba(13,14,16,.98)!important;border-top:1px solid var(--ckm-border)!important;backdrop-filter:blur(20px)!important
  }
  .ck-mobile-editor-dock button{
    min-height:56px!important;padding:5px 3px!important;border:0!important;border-radius:13px!important;background:transparent!important;color:#a4a9b3!important;
    display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:2px!important
  }
  .ck-mobile-editor-dock button span{font-size:22px!important;line-height:1!important}.ck-mobile-editor-dock button b{font-size:11px!important}
  .ck-mobile-editor-dock button.is-primary{background:linear-gradient(145deg,#df3343,#a71320)!important;color:#fff!important}

  /* Bottom sheet d'actions document */
  .ck-mobile-editor-menu{position:fixed;inset:0;z-index:300000;display:flex;align-items:flex-end;padding:10px;background:rgba(0,0,0,.62);backdrop-filter:blur(5px)}
  .ck-mobile-editor-menu>section{width:100%;max-height:82dvh;overflow:auto;padding:8px 10px calc(12px + env(safe-area-inset-bottom,0px));border:1px solid var(--ckm-border);border-radius:22px;background:#17191d;box-shadow:0 30px 100px rgba(0,0,0,.6)}
  .ck-mobile-editor-menu header{display:flex;justify-content:space-between;align-items:center;padding:3px 4px 10px}
  .ck-mobile-editor-menu header small{color:#e45160;font-size:10px;font-weight:900;letter-spacing:.13em}.ck-mobile-editor-menu header h3{margin:3px 0 0;font-size:22px}
  .ck-mobile-editor-menu header button{width:42px!important;height:42px!important;min-height:42px!important;padding:0!important;border-radius:12px!important}
  .ck-mobile-editor-menu-list{display:grid;gap:7px}
  .ck-mobile-editor-menu-list>button{display:grid!important;grid-template-columns:42px 1fr auto!important;gap:11px!important;align-items:center!important;min-height:66px!important;padding:10px 12px!important;text-align:left!important;border:1px solid var(--ckm-border)!important;border-radius:14px!important;background:#202329!important;color:#f3f4f6!important}
  .ck-mobile-editor-menu-list>button>span:first-child{display:grid;place-items:center;width:39px;height:39px;border-radius:11px;background:rgba(226,56,72,.12);color:#f06472;font-size:20px}
  .ck-mobile-editor-menu-list b,.ck-mobile-editor-menu-list small{display:block}.ck-mobile-editor-menu-list b{font-size:15px}.ck-mobile-editor-menu-list small{margin-top:2px;color:#9298a2;font-size:12px}.ck-mobile-editor-menu-list em{font-style:normal;color:#777d87;font-size:22px}
  .ck-mobile-editor-menu-list>button.danger{border-color:rgba(255,72,85,.35)!important}.ck-mobile-editor-menu-list>button.danger b{color:#ff6a76!important}

  /* Modales secondaires du devis/facture : plein écran/bottom sheet lisible */
  body.ck-app-authenticated .ck-quote-catalog-modal[aria-hidden="false"],
  body.ck-app-authenticated .ck-template-modal[aria-hidden="false"],
  body.ck-app-authenticated .ck-save-template-modal[aria-hidden="false"],
  body.ck-app-authenticated .ck-new-quote-modal[aria-hidden="false"]{padding:0!important;align-items:flex-end!important}
  body.ck-app-authenticated .ck-quote-catalog-panel,
  body.ck-app-authenticated .ck-template-panel{width:100vw!important;max-width:none!important;height:94dvh!important;max-height:94dvh!important;border-radius:20px 20px 0 0!important;overflow:auto!important}
  body.ck-app-authenticated .ck-quote-catalog-layout,
  body.ck-app-authenticated .ck-template-layout,
  body.ck-app-authenticated .ck-new-quote-layout{display:block!important}
  body.ck-app-authenticated .ck-template-preview{margin-top:12px!important}

  /* Clients : cartes / boutons tactiles */
  body.ck-app-authenticated #clientsTbl tr{grid-template-columns:auto minmax(0,1fr) auto!important;align-items:center!important;gap:10px!important}
  body.ck-app-authenticated #clientsTbl td{font-size:14px!important}

  /* Planning : priorité à Aujourd'hui sur petit écran */
  body.ck-app-authenticated .ck-planning-main-grid{display:block!important}
  body.ck-app-authenticated .ck-planning-right{display:block!important;width:100%!important}
  body.ck-app-authenticated .ck-planning-calendar-shell{overflow:hidden!important}
  body.ck-app-authenticated .ck-planning-mobile-tabs{display:flex!important;overflow-x:auto!important}
  body.ck-app-authenticated .ck-planning-head-actions{display:grid!important;gap:8px!important}
  body.ck-app-authenticated .ck-planning-head-actions>*{width:100%!important}

  /* Mails : liste puis lecteur plutôt que 3 colonnes écrasées */
  body.ck-app-authenticated .ck-mail-shell{display:block!important}
  body.ck-app-authenticated .ck-mail-folders{display:flex!important;overflow-x:auto!important;gap:6px!important;width:100%!important;margin-bottom:9px!important}
  body.ck-app-authenticated .ck-mail-folders button{flex:0 0 auto!important;min-height:42px!important}
  body.ck-app-authenticated .ck-mail-list-wrap,body.ck-app-authenticated .ck-mail-reader{width:100%!important;min-width:0!important}

  /* Réglages / compta / banque : aucune grille desktop forcée */
  body.ck-app-authenticated #tab-settings .grid,
  body.ck-app-authenticated #tab-bank .grid,
  body.ck-app-authenticated #tab-compta .grid{grid-template-columns:1fr!important}
  body.ck-app-authenticated #tab-bank .row,
  body.ck-app-authenticated #tab-compta .row{flex-wrap:wrap!important}
  body.ck-app-authenticated #tab-bank .row button,
  body.ck-app-authenticated #tab-compta .row button{flex:1 1 100%!important}
}

/* CKlean Mobile V5 — correctif Safari iPhone : éditeur de lignes réellement utilisable */
@media (max-width:760px){
  body.ck-app-authenticated #devisSheet .ck-quote-lines-card,
  body.ck-app-authenticated #factureSheet .ck-quote-lines-card{min-height:0!important;height:auto!important;overflow:visible!important;padding:14px!important}
  body.ck-app-authenticated #devisSheet .ck-quote-lines-wrap,
  body.ck-app-authenticated #factureSheet .ck-quote-lines-wrap{display:block!important;min-height:0!important;height:auto!important;overflow:visible!important;border:0!important;background:transparent!important}
  body.ck-app-authenticated #devisSheet .ck-quote-lines-table,
  body.ck-app-authenticated #factureSheet .ck-quote-lines-table{display:table!important;width:100%!important;min-width:0!important;table-layout:fixed!important;border-collapse:separate!important;border-spacing:0 10px!important}
  body.ck-app-authenticated #devisSheet .ck-quote-lines-table>thead,
  body.ck-app-authenticated #factureSheet .ck-quote-lines-table>thead{display:none!important}
  body.ck-app-authenticated #linesBody,
  body.ck-app-authenticated #fLinesBody{display:table-row-group!important;width:100%!important}
  body.ck-app-authenticated #linesBody>tr,
  body.ck-app-authenticated #fLinesBody>tr{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important;width:100%!important;margin:0 0 12px!important;padding:14px!important;border:1px solid rgba(255,255,255,.11)!important;border-radius:16px!important;background:#17191d!important;box-sizing:border-box!important}
  body.ck-app-authenticated #linesBody>tr>td,
  body.ck-app-authenticated #fLinesBody>tr>td{display:block!important;width:100%!important;min-width:0!important;max-width:none!important;padding:0!important;box-sizing:border-box!important}
  body.ck-app-authenticated #linesBody>tr.ck-quote-service-row>td:nth-child(1),
  body.ck-app-authenticated #fLinesBody>tr.ck-quote-service-row>td:nth-child(1){grid-column:1/-1!important;width:44px!important}
  body.ck-app-authenticated #linesBody>tr.ck-quote-service-row>td:nth-child(2),
  body.ck-app-authenticated #fLinesBody>tr.ck-quote-service-row>td:nth-child(2){grid-column:1/-1!important}
  body.ck-app-authenticated #linesBody>tr.ck-quote-service-row>td:nth-child(3),
  body.ck-app-authenticated #fLinesBody>tr.ck-quote-service-row>td:nth-child(3){grid-column:1/2!important}
  body.ck-app-authenticated #linesBody>tr.ck-quote-service-row>td:nth-child(4),
  body.ck-app-authenticated #fLinesBody>tr.ck-quote-service-row>td:nth-child(4){grid-column:2/3!important}
  body.ck-app-authenticated #linesBody>tr.ck-quote-service-row>td:nth-child(5),
  body.ck-app-authenticated #fLinesBody>tr.ck-quote-service-row>td:nth-child(5){grid-column:1/2!important}
  body.ck-app-authenticated #linesBody>tr.ck-quote-service-row>td:nth-child(6),
  body.ck-app-authenticated #fLinesBody>tr.ck-quote-service-row>td:nth-child(6){grid-column:2/3!important;display:flex!important;flex-direction:column!important;justify-content:flex-end!important;font-size:22px!important;font-weight:900!important}
  body.ck-app-authenticated #linesBody>tr.ck-quote-service-row>td:nth-child(7),
  body.ck-app-authenticated #fLinesBody>tr.ck-quote-service-row>td:nth-child(7){grid-column:1/-1!important}
  body.ck-app-authenticated #linesBody>tr.ck-quote-special-row,
  body.ck-app-authenticated #linesBody>tr.ck-quote-section-row,
  body.ck-app-authenticated #fLinesBody>tr.ck-quote-special-row,
  body.ck-app-authenticated #fLinesBody>tr.ck-quote-section-row{display:block!important}
  body.ck-app-authenticated #linesBody>tr.ck-quote-special-row>td,
  body.ck-app-authenticated #linesBody>tr.ck-quote-section-row>td,
  body.ck-app-authenticated #fLinesBody>tr.ck-quote-special-row>td,
  body.ck-app-authenticated #fLinesBody>tr.ck-quote-section-row>td{display:block!important;width:100%!important;margin-bottom:8px!important}
  body.ck-app-authenticated #linesBody td[data-mobile-label]::before,
  body.ck-app-authenticated #fLinesBody td[data-mobile-label]::before{content:attr(data-mobile-label)!important;display:block!important;margin:0 0 6px!important;color:#9ba0aa!important;font-size:11px!important;font-weight:900!important;text-transform:uppercase!important;letter-spacing:.04em!important}
  body.ck-app-authenticated #linesBody .ck-rich-description,
  body.ck-app-authenticated #fLinesBody .ck-rich-description{display:block!important;min-height:72px!important;max-height:none!important;overflow:visible!important;color:#fff!important;opacity:1!important}
  body.ck-app-authenticated #linesBody .ck-line-actions,
  body.ck-app-authenticated #fLinesBody .ck-line-actions{display:grid!important;grid-template-columns:repeat(4,1fr)!important;gap:8px!important;width:100%!important}
  body.ck-app-authenticated #linesBody .ck-line-actions button,
  body.ck-app-authenticated #fLinesBody .ck-line-actions button{width:100%!important;min-width:0!important;min-height:46px!important;border-radius:11px!important}
  body.ck-app-authenticated #devisSheet .ck-quote-lines-help,
  body.ck-app-authenticated #factureSheet .ck-quote-lines-help{display:none!important}
  body.ck-app-authenticated #devisSheet .ck-quote-studio-title h4,
  body.ck-app-authenticated #factureSheet .ck-quote-studio-title h4{font-size:20px!important}
  body.ck-app-authenticated #devisSheet .ck-quote-studio-title p,
  body.ck-app-authenticated #factureSheet .ck-quote-studio-title p{display:none!important}
}

/* CKlean Mobile V6 — iPhone : les totaux restent dans le flux, jamais au-dessus des lignes */
@media (max-width:760px){
  body.ck-app-authenticated #devisSheet.ck-quote-sheet,
  body.ck-app-authenticated #factureSheet.ck-invoice-sheet{
    overflow-x:hidden!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch!important;
    overscroll-behavior:contain!important;
  }

  /* La grille ne doit plus être la zone scrollable/flex qui laisse ses lignes
     déborder sous le bloc Totaux. Toute la feuille défile d'un seul tenant. */
  body.ck-app-authenticated #devisSheet .ck-quote-editor-grid,
  body.ck-app-authenticated #factureSheet .ck-quote-editor-grid{
    flex:0 0 auto!important;
    min-height:0!important;
    height:auto!important;
    overflow:visible!important;
    padding-bottom:12px!important;
  }

  body.ck-app-authenticated #devisSheet .ck-quote-lines-card,
  body.ck-app-authenticated #factureSheet .ck-quote-lines-card,
  body.ck-app-authenticated #devisSheet .ck-quote-lines-wrap,
  body.ck-app-authenticated #factureSheet .ck-quote-lines-wrap{
    flex:none!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
  }

  body.ck-app-authenticated #devisSheet .devisBottomRow.ck-quote-totals-bar,
  body.ck-app-authenticated #factureSheet .ck-quote-totals-bar{
    position:relative!important;
    inset:auto!important;
    z-index:2!important;
    flex:0 0 auto!important;
    width:100%!important;
    height:auto!important;
    max-height:none!important;
    margin:0!important;
    padding:0 10px calc(105px + env(safe-area-inset-bottom,0px))!important;
    transform:none!important;
    background:#0f1012!important;
  }

  /* Les onglets restent accessibles pendant le défilement sans masquer le contenu. */
  body.ck-app-authenticated #devisSheet .ck-mobile-editor-sections,
  body.ck-app-authenticated #factureSheet .ck-mobile-editor-sections{
    top:calc(60px + env(safe-area-inset-top,0px))!important;
  }

  /* Un peu d'air après la dernière ligne avant les totaux. */
  body.ck-app-authenticated #devisSheet #linesBody>tr:last-child,
  body.ck-app-authenticated #factureSheet #fLinesBody>tr:last-child{
    margin-bottom:4px!important;
  }
}

/* CKlean Mobile V7 — édition tactile + dock réellement collé au bas de l’iPhone
   Même comportement pour DEVIS et FACTURES. */
@media (max-width:760px){
  /* Le dock est maintenant injecté directement dans body (pas dans la feuille scrollable),
     ce qui évite le bug Safari où bottom:0 se retrouvait au milieu de l’écran. */
  body>.ck-mobile-editor-dock{
    position:fixed!important;
    left:0!important;right:0!important;bottom:0!important;top:auto!important;
    width:100vw!important;
    margin:0!important;
    transform:none!important;
    z-index:350000!important;
    padding:7px 8px calc(7px + env(safe-area-inset-bottom,0px))!important;
    background:rgba(13,14,16,.985)!important;
    border-top:1px solid var(--ckm-border)!important;
    box-shadow:0 -12px 32px rgba(0,0,0,.28)!important;
  }
  body>.ck-mobile-editor-dock[hidden]{display:none!important}

  /* Laisser suffisamment d’espace sous le document pour ne jamais cacher la dernière ligne / totaux. */
  body.ck-app-authenticated #devisSheet .ck-quote-totals-bar,
  body.ck-app-authenticated #factureSheet .ck-quote-totals-bar{
    padding-bottom:calc(96px + env(safe-area-inset-bottom,0px))!important;
  }

  /* Carte de prestation : zones tactiles nettes et aucune étiquette superposée. */
  body.ck-app-authenticated #linesBody>tr.ck-mobile-service-row,
  body.ck-app-authenticated #fLinesBody>tr.ck-mobile-service-row{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:14px 10px!important;
    padding:14px!important;
    overflow:hidden!important;
  }
  body.ck-app-authenticated #linesBody>tr.ck-mobile-service-row>td,
  body.ck-app-authenticated #fLinesBody>tr.ck-mobile-service-row>td{
    position:relative!important;
    min-width:0!important;
    height:auto!important;
    overflow:visible!important;
  }
  body.ck-app-authenticated #linesBody>tr.ck-mobile-service-row>td:nth-child(1),
  body.ck-app-authenticated #fLinesBody>tr.ck-mobile-service-row>td:nth-child(1){grid-column:1/-1!important;width:46px!important}
  body.ck-app-authenticated #linesBody>tr.ck-mobile-service-row>td:nth-child(2),
  body.ck-app-authenticated #fLinesBody>tr.ck-mobile-service-row>td:nth-child(2){grid-column:1/-1!important}
  body.ck-app-authenticated #linesBody>tr.ck-mobile-service-row>td:nth-child(3),
  body.ck-app-authenticated #fLinesBody>tr.ck-mobile-service-row>td:nth-child(3){grid-column:1/2!important}
  body.ck-app-authenticated #linesBody>tr.ck-mobile-service-row>td:nth-child(4),
  body.ck-app-authenticated #fLinesBody>tr.ck-mobile-service-row>td:nth-child(4){grid-column:2/3!important}
  body.ck-app-authenticated #linesBody>tr.ck-mobile-service-row>td:nth-child(5),
  body.ck-app-authenticated #fLinesBody>tr.ck-mobile-service-row>td:nth-child(5){grid-column:1/2!important}
  body.ck-app-authenticated #linesBody>tr.ck-mobile-service-row>td:nth-child(6),
  body.ck-app-authenticated #fLinesBody>tr.ck-mobile-service-row>td:nth-child(6){grid-column:2/3!important;align-self:end!important}
  body.ck-app-authenticated #linesBody>tr.ck-mobile-service-row>td:nth-child(7),
  body.ck-app-authenticated #fLinesBody>tr.ck-mobile-service-row>td:nth-child(7){grid-column:1/-1!important}

  /* Les labels occupent leur propre ligne : plus de QUANTITÉ/PRIX par-dessus les valeurs. */
  body.ck-app-authenticated #linesBody td[data-mobile-label]::before,
  body.ck-app-authenticated #fLinesBody td[data-mobile-label]::before{
    position:static!important;
    content:attr(data-mobile-label)!important;
    display:block!important;
    width:auto!important;height:auto!important;
    margin:0 0 7px!important;
    padding:0!important;
    color:#a4a9b2!important;
    font-size:11px!important;
    line-height:1.15!important;
    font-weight:900!important;
    letter-spacing:.055em!important;
    text-transform:uppercase!important;
    transform:none!important;
  }

  /* Description : toolbar au-dessus, grande vraie zone d’écriture sélectionnable. */
  body.ck-app-authenticated #linesBody .ck-rich-line,
  body.ck-app-authenticated #fLinesBody .ck-rich-line{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:8px!important;
    width:100%!important;
  }
  body.ck-app-authenticated #linesBody .ck-rich-toolbar,
  body.ck-app-authenticated #fLinesBody .ck-rich-toolbar{
    display:flex!important;
    width:100%!important;
    gap:7px!important;
    opacity:1!important;
    order:1!important;
  }
  body.ck-app-authenticated #linesBody .ck-rich-toolbar button,
  body.ck-app-authenticated #fLinesBody .ck-rich-toolbar button{
    width:42px!important;height:42px!important;min-height:42px!important;
    padding:0!important;
    border:1px solid rgba(255,255,255,.14)!important;
    border-radius:10px!important;
    background:#202329!important;
    color:#b8bcc4!important;
    font-size:16px!important;
  }
  body.ck-app-authenticated #linesBody .ck-rich-description,
  body.ck-app-authenticated #fLinesBody .ck-rich-description{
    order:2!important;
    display:block!important;
    width:100%!important;
    min-width:0!important;
    min-height:66px!important;
    max-height:none!important;
    padding:12px!important;
    border:1px solid rgba(255,255,255,.12)!important;
    border-radius:12px!important;
    background:#111317!important;
    color:#f5f5f7!important;
    font-size:16px!important;
    line-height:1.42!important;
    font-weight:650!important;
    -webkit-user-select:text!important;
    user-select:text!important;
    touch-action:manipulation!important;
    caret-color:#fff!important;
    overflow:visible!important;
    box-sizing:border-box!important;
  }
  body.ck-app-authenticated #linesBody .ck-rich-description:focus,
  body.ck-app-authenticated #fLinesBody .ck-rich-description:focus{
    border-color:rgba(226,56,72,.65)!important;
    background:#15171b!important;
    box-shadow:0 0 0 3px rgba(226,56,72,.10)!important;
  }

  /* Quantité / prix / TVA : gros champs faciles à viser et sélectionner. */
  body.ck-app-authenticated #linesBody td[data-mobile-label] input,
  body.ck-app-authenticated #linesBody td[data-mobile-label] select,
  body.ck-app-authenticated #fLinesBody td[data-mobile-label] input,
  body.ck-app-authenticated #fLinesBody td[data-mobile-label] select{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    min-height:52px!important;
    height:52px!important;
    margin:0!important;
    padding:10px 12px!important;
    border:1px solid rgba(255,255,255,.12)!important;
    border-radius:12px!important;
    background:#111317!important;
    color:#f3f4f6!important;
    font-size:17px!important;
    line-height:1.2!important;
    box-sizing:border-box!important;
  }
  body.ck-app-authenticated #linesBody td[data-mobile-label] input:focus,
  body.ck-app-authenticated #linesBody td[data-mobile-label] select:focus,
  body.ck-app-authenticated #fLinesBody td[data-mobile-label] input:focus,
  body.ck-app-authenticated #fLinesBody td[data-mobile-label] select:focus{
    border-color:rgba(226,56,72,.65)!important;
    background:#15171b!important;
    outline:none!important;
    box-shadow:0 0 0 3px rgba(226,56,72,.10)!important;
  }
  body.ck-app-authenticated #linesBody td[data-mobile-label] select:disabled,
  body.ck-app-authenticated #fLinesBody td[data-mobile-label] select:disabled{opacity:.55!important}

  body.ck-app-authenticated #linesBody>tr.ck-mobile-service-row>td:nth-child(6),
  body.ck-app-authenticated #fLinesBody>tr.ck-mobile-service-row>td:nth-child(6){
    min-height:72px!important;
    padding:4px 0 2px!important;
    font-size:24px!important;
    font-weight:900!important;
    text-align:right!important;
  }

  /* Les lignes texte / titres utilisent aussi une grande zone d’édition. */
  body.ck-app-authenticated #linesBody>tr.ck-quote-special-row .ck-rich-description,
  body.ck-app-authenticated #linesBody>tr.ck-quote-section-row .ck-rich-description,
  body.ck-app-authenticated #fLinesBody>tr.ck-quote-note-row .ck-rich-description,
  body.ck-app-authenticated #fLinesBody>tr.ck-quote-section-row .ck-rich-description,
  body.ck-app-authenticated #fLinesBody>tr.ck-quote-subtotal-row .ck-rich-description{min-height:82px!important}
}

/* CKlean Mobile V8 — UX téléphone : aucun dock fixe, édition simple, actions au fond.
   Même interface pour devis et factures. */
@media (max-width:760px){
  /* Neutralise définitivement l'ancien gros dock noir. */
  body>.ck-mobile-editor-dock,
  #devisSheet .ck-mobile-editor-dock,
  #factureSheet .ck-mobile-editor-dock{display:none!important}

  /* Le contenu n'a plus besoin de réserver 100px pour une barre fixe. */
  body.ck-app-authenticated #devisSheet .ck-quote-editor-grid,
  body.ck-app-authenticated #factureSheet .ck-quote-editor-grid{padding-bottom:20px!important}
  body.ck-app-authenticated #devisSheet .ck-quote-totals-bar,
  body.ck-app-authenticated #factureSheet .ck-quote-totals-bar{padding-bottom:18px!important}

  /* Actions finales : dans le flux, tout en bas du document. */
  .ck-mobile-editor-footer{
    position:relative!important;inset:auto!important;z-index:3!important;
    display:grid!important;grid-template-columns:1fr 1.25fr 1fr!important;gap:8px!important;
    width:auto!important;margin:0 10px calc(22px + env(safe-area-inset-bottom,0px))!important;padding:10px!important;
    border:1px solid rgba(255,255,255,.10)!important;border-radius:17px!important;background:#17191d!important;
    box-shadow:none!important
  }
  .ck-mobile-editor-footer button{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:4px!important;min-height:62px!important;padding:7px!important;border:1px solid rgba(255,255,255,.09)!important;border-radius:13px!important;background:#202329!important;color:#e9eaed!important}
  .ck-mobile-editor-footer button span{font-size:20px!important;line-height:1!important}.ck-mobile-editor-footer button b{font-size:12px!important}
  .ck-mobile-editor-footer button.is-primary{background:linear-gradient(145deg,#df3343,#b51b2a)!important;border-color:transparent!important;color:#fff!important}

  /* Un seul bouton flottant, petit, pour ajouter une ligne. */
  body>.ck-mobile-editor-fab{
    position:fixed!important;right:16px!important;bottom:calc(16px + env(safe-area-inset-bottom,0px))!important;z-index:340000!important;
    width:62px!important;height:62px!important;min-height:62px!important;padding:0!important;border:0!important;border-radius:20px!important;
    display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:0!important;
    background:linear-gradient(145deg,#e13949,#b21625)!important;color:#fff!important;box-shadow:0 12px 30px rgba(0,0,0,.38)!important
  }
  body>.ck-mobile-editor-fab[hidden]{display:none!important}
  body>.ck-mobile-editor-fab span{font-size:27px!important;line-height:24px!important}body>.ck-mobile-editor-fab small{font-size:9px!important;color:#fff!important;font-weight:850!important}
  body.ck-keyboard-open>.ck-mobile-editor-fab{display:none!important}

  /* Les cartes deviennent plus simples : Description puis Qté/Prix, puis TVA/Total. */
  body.ck-app-authenticated #linesBody>tr.ck-mobile-service-row,
  body.ck-app-authenticated #fLinesBody>tr.ck-mobile-service-row{gap:12px 10px!important;padding:13px!important;border-radius:17px!important;background:#17191d!important;overflow:visible!important}
  body.ck-app-authenticated #linesBody>tr.ck-mobile-service-row::before,
  body.ck-app-authenticated #fLinesBody>tr.ck-mobile-service-row::before{top:14px!important;right:14px!important;font-size:9px!important;color:#717680!important}

  /* Description : le bouton Modifier donne un éditeur plein écran facile sur iPhone. */
  body.ck-app-authenticated #linesBody td:nth-child(2),body.ck-app-authenticated #fLinesBody td:nth-child(2){position:relative!important;padding-top:0!important}
  .ck-mobile-edit-description{
    position:absolute!important;right:0!important;top:-2px!important;z-index:3!important;min-height:34px!important;height:34px!important;padding:0 10px!important;
    border:1px solid rgba(255,255,255,.11)!important;border-radius:10px!important;background:#23262c!important;color:#e6e8ec!important;font-size:12px!important;font-weight:800!important
  }
  body.ck-app-authenticated #linesBody td:nth-child(2)[data-mobile-label]::before,
  body.ck-app-authenticated #fLinesBody td:nth-child(2)[data-mobile-label]::before{padding-right:92px!important;min-height:34px!important;display:flex!important;align-items:center!important;margin-bottom:7px!important}
  body.ck-app-authenticated #linesBody .ck-rich-toolbar,
  body.ck-app-authenticated #fLinesBody .ck-rich-toolbar{display:none!important}
  body.ck-app-authenticated #linesBody .ck-rich-description,
  body.ck-app-authenticated #fLinesBody .ck-rich-description{min-height:58px!important;padding:11px 12px!important;font-size:16px!important;font-weight:650!important;line-height:1.42!important}

  /* Champs clairs, très tactiles. */
  body.ck-app-authenticated #linesBody td[data-mobile-label] input,
  body.ck-app-authenticated #linesBody td[data-mobile-label] select,
  body.ck-app-authenticated #fLinesBody td[data-mobile-label] input,
  body.ck-app-authenticated #fLinesBody td[data-mobile-label] select{height:50px!important;min-height:50px!important;border-radius:12px!important;font-size:17px!important;padding:9px 11px!important}
  body.ck-app-authenticated #linesBody>tr.ck-mobile-service-row>td:nth-child(6),
  body.ck-app-authenticated #fLinesBody>tr.ck-mobile-service-row>td:nth-child(6){display:flex!important;flex-direction:column!important;align-items:flex-end!important;justify-content:flex-end!important;min-height:66px!important;font-size:23px!important}

  /* Actions de ligne : un seul bouton. Les boutons natifs restent présents mais invisibles, le menu les déclenche. */
  body.ck-app-authenticated #linesBody .ck-line-actions,
  body.ck-app-authenticated #fLinesBody .ck-line-actions{display:none!important}
  .ck-mobile-row-actions{width:100%!important;min-height:44px!important;padding:8px 12px!important;border:1px solid rgba(255,255,255,.10)!important;border-radius:11px!important;background:#202329!important;color:#b9bec7!important;font-size:13px!important;font-weight:800!important}

  /* Grand éditeur de texte : pensé pour le clavier iPhone. */
  .ck-mobile-rich-editor{position:fixed;inset:0;z-index:500000;display:flex;align-items:stretch;background:#0f1012}
  .ck-mobile-rich-editor>section{display:flex;flex-direction:column;width:100%;height:100dvh;padding:calc(8px + env(safe-area-inset-top,0px)) 12px calc(12px + env(safe-area-inset-bottom,0px));box-sizing:border-box;background:#0f1012}
  .ck-mobile-rich-editor header{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:8px;padding-bottom:10px;border-bottom:1px solid rgba(255,255,255,.09)}
  .ck-mobile-rich-editor header>div{text-align:center;min-width:0}.ck-mobile-rich-editor header small{display:block;color:#9ba0aa;font-size:9px;font-weight:900;letter-spacing:.08em}.ck-mobile-rich-editor header b{display:block;font-size:15px;margin-top:2px}
  .ck-mobile-rich-editor header button{min-height:42px!important;padding:0 12px!important;border-radius:11px!important;background:#202329!important;border:1px solid rgba(255,255,255,.10)!important;color:#e8e9eb!important;font-size:13px!important;font-weight:800!important}
  .ck-mobile-rich-editor header [data-save]{background:#d92e3e!important;color:#fff!important;border-color:transparent!important;min-width:56px!important}
  .ck-mobile-rich-tools{display:flex;gap:8px;padding:10px 0}.ck-mobile-rich-tools button{width:46px!important;height:44px!important;min-height:44px!important;padding:0!important;border-radius:11px!important;background:#202329!important;border:1px solid rgba(255,255,255,.10)!important;color:#e4e6ea!important}
  .ck-mobile-rich-area{flex:1;min-height:0;overflow:auto;-webkit-overflow-scrolling:touch;padding:16px;border:1px solid rgba(255,255,255,.12);border-radius:15px;background:#15171b;color:#fff;font-size:18px;line-height:1.55;outline:none;-webkit-user-select:text;user-select:text;caret-color:#fff}

  /* Menu d'une ligne. */
  .ck-mobile-row-menu{position:fixed;inset:0;z-index:480000;display:flex;align-items:flex-end;padding:10px;background:rgba(0,0,0,.62);backdrop-filter:blur(5px)}
  .ck-mobile-row-menu>section{width:100%;padding:8px 10px calc(12px + env(safe-area-inset-bottom,0px));border:1px solid rgba(255,255,255,.11);border-radius:22px;background:#17191d}
  .ck-mobile-row-menu h3{margin:4px 4px 10px;font-size:18px!important}.ck-mobile-row-menu button{display:grid!important;grid-template-columns:40px 1fr auto!important;gap:10px!important;align-items:center!important;width:100%!important;min-height:56px!important;margin-top:7px!important;padding:8px 10px!important;border:1px solid rgba(255,255,255,.09)!important;border-radius:12px!important;background:#202329!important;color:#eef0f2!important;text-align:left!important}.ck-mobile-row-menu button>span{font-size:18px;text-align:center}.ck-mobile-row-menu button b{font-size:14px}.ck-mobile-row-menu button em{font-style:normal;color:#737983;font-size:20px}.ck-mobile-row-menu button.danger b{color:#ff6874!important}
}

/* ===== CKLEAN MOBILE V6 — DEVIS LISTE FINALISEE ===== */
@media (max-width:760px){
  /* Plus de contenu utile à l'écran : cartes devis compactes */
  body.ck-app-authenticated #devisTbody tr{
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-rows:auto auto auto!important;
    gap:4px 10px!important;
    margin:8px 4px!important;
    padding:12px 13px!important;
    min-height:0!important;
    border-radius:15px!important;
  }
  body.ck-app-authenticated #devisTbody td{font-size:13px!important;line-height:1.25!important}
  body.ck-app-authenticated #devisTbody td:nth-child(1){grid-column:1;grid-row:1;margin:0!important}
  body.ck-app-authenticated #devisTbody td:nth-child(2){grid-column:1;grid-row:2;margin:0!important}
  body.ck-app-authenticated #devisTbody td:nth-child(3){grid-column:1;grid-row:3;margin:2px 0 0!important}
  body.ck-app-authenticated #devisTbody td:nth-child(4){grid-column:1;grid-row:4;margin:2px 0 0!important}
  body.ck-app-authenticated #devisTbody td:nth-child(5){grid-column:2;grid-row:1!important;align-self:start;font-size:17px!important;line-height:1.15!important;white-space:nowrap!important}
  body.ck-app-authenticated #devisTbody td:nth-child(6){grid-column:2;grid-row:2/5!important;align-self:center!important;justify-self:end!important}
  body.ck-app-authenticated #devisTbody .ck-quote-doc-cell b{font-size:16px!important;line-height:1.15!important}
  body.ck-app-authenticated #devisTbody .ck-quote-doc-cell small{display:block!important;max-width:210px!important;margin-top:3px!important;font-size:11px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;color:#9da2ab!important}
  body.ck-app-authenticated #devisTbody .ck-quote-client-cell b{font-size:14px!important;line-height:1.2!important}
  body.ck-app-authenticated #devisTbody .ck-quote-client-cell small{font-size:11px!important}
  body.ck-app-authenticated #devisTbody .ck-quote-row-menu{width:38px!important;height:38px!important;min-height:38px!important;border-radius:11px!important;font-size:14px!important;background:rgba(255,255,255,.035)!important}
  body.ck-app-authenticated #devisTbody .statusPill{min-height:28px!important;padding:4px 9px!important;font-size:11px!important}

  /* Filtres en vraies pastilles horizontales, jamais coupés */
  body.ck-app-authenticated .ck-quote-filter-row{overflow:visible!important;position:relative!important}
  body.ck-app-authenticated .ck-quote-status-filters{
    width:100%!important;max-width:100%!important;overflow-x:auto!important;overflow-y:hidden!important;
    display:flex!important;flex-wrap:nowrap!important;gap:7px!important;padding:4px 10px 9px!important;
    scroll-snap-type:x proximity!important;overscroll-behavior-x:contain!important
  }
  body.ck-app-authenticated .ck-quote-status-filters button{
    flex:0 0 auto!important;min-height:38px!important;padding:7px 12px!important;border-radius:12px!important;
    font-size:12px!important;scroll-snap-align:start!important
  }

  /* Menu ••• devis = bottom sheet iPhone, indépendant de la page */
  body.ck-app-authenticated #devisContextMenu.ck-quote-context-menu{
    position:fixed!important;z-index:400000!important;
    left:8px!important;right:8px!important;top:auto!important;
    bottom:calc(8px + env(safe-area-inset-bottom,0px))!important;
    width:auto!important;max-width:none!important;max-height:min(70dvh,620px)!important;
    overflow-y:auto!important;-webkit-overflow-scrolling:touch!important;
    padding:8px 10px calc(10px + env(safe-area-inset-bottom,0px))!important;
    border-radius:22px!important;background:rgba(25,26,30,.985)!important;
    box-shadow:0 0 0 100vmax rgba(0,0,0,.58),0 -18px 60px rgba(0,0,0,.55)!important;
    transform:translateY(12px)!important;opacity:0!important
  }
  body.ck-app-authenticated #devisContextMenu.ck-quote-context-menu.is-open{transform:none!important;opacity:1!important}
  body.ck-app-authenticated #devisContextMenu.ck-quote-context-menu>div{padding:8px 6px 11px!important;gap:10px!important}
  body.ck-app-authenticated #devisContextMenu.ck-quote-context-menu>div b{font-size:14px!important}
  body.ck-app-authenticated #devisContextMenu.ck-quote-context-menu>div small{font-size:11px!important}
  body.ck-app-authenticated #devisContextMenu.ck-quote-context-menu>button{
    grid-template-columns:42px minmax(0,1fr) 18px!important;gap:10px!important;
    min-height:56px!important;padding:7px 8px!important;border-radius:13px!important
  }
  body.ck-app-authenticated #devisContextMenu.ck-quote-context-menu>button>span:first-child{width:40px!important;height:40px!important;border-radius:11px!important;font-size:17px!important}
  body.ck-app-authenticated #devisContextMenu.ck-quote-context-menu button b{font-size:14px!important;line-height:1.15!important}
  body.ck-app-authenticated #devisContextMenu.ck-quote-context-menu button small{font-size:11px!important;line-height:1.25!important}

  /* En-tête devis un peu plus dense */
  body.ck-app-authenticated .ck-quotes-page-head{gap:10px!important;margin-bottom:12px!important}
  body.ck-app-authenticated .ck-quotes-page-head h2{font-size:29px!important}
  body.ck-app-authenticated .ck-quotes-page-head p{margin-top:2px!important;font-size:14px!important}
  body.ck-app-authenticated .ck-quotes-kpis{gap:8px!important}
  body.ck-app-authenticated .ck-quotes-kpis>*{padding:12px!important;min-height:88px!important}
}

/* ===== CKLEAN MOBILE V7 — DEVIS : MODALES + MENU ••• STABLE ===== */
@media (max-width:760px){
  /* Le bouton principal garde son libellé complet : évite le + ajouté par l'ancien CSS mobile. */
  body.ck-app-authenticated .ck-quotes-page-head #dBtnCreate::after{
    content:none!important;
    display:none!important;
  }
  body.ck-app-authenticated .ck-quotes-page-head #dBtnCreate{
    font-size:16px!important;
    min-height:54px!important;
    padding:12px 16px!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }

  /* Menu ••• : vraie bottom-sheet fixe, toujours au même endroit, au-dessus de la nav CKlean. */
  body.ck-app-authenticated #devisContextMenu.ck-quote-context-menu{
    position:fixed!important;
    left:10px!important;
    right:10px!important;
    top:auto!important;
    bottom:calc(var(--ck-mobile-nav-h) + var(--ck-mobile-safe) + 10px)!important;
    width:auto!important;
    max-width:none!important;
    max-height:min(62dvh,560px)!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
    z-index:700000!important;
    transform:translateY(14px)!important;
    opacity:0!important;
    border-radius:22px!important;
    box-shadow:0 0 0 100vmax rgba(0,0,0,.62),0 20px 70px rgba(0,0,0,.65)!important;
  }
  body.ck-app-authenticated #devisContextMenu.ck-quote-context-menu.is-open{
    transform:none!important;
    opacity:1!important;
  }

  /* Création / duplication devis et nouvelle facture : plein écran mobile, plus rien derrière la nav. */
  body.ck-app-authenticated #newDevisModal[aria-hidden="false"],
  body.ck-app-authenticated #duplicateQuoteModal[aria-hidden="false"],
  body.ck-app-authenticated #newFactureModal[aria-hidden="false"]{
    position:fixed!important;
    inset:0!important;
    z-index:720000!important;
    display:flex!important;
    align-items:stretch!important;
    justify-content:stretch!important;
    padding:0!important;
    background:rgba(7,8,10,.94)!important;
  }
  body.ck-app-authenticated #newDevisModal .ck-new-quote-card,
  body.ck-app-authenticated #duplicateQuoteModal .ck-new-quote-card,
  body.ck-app-authenticated #newFactureModal .ck-new-quote-card{
    display:flex!important;
    flex-direction:column!important;
    width:100vw!important;
    max-width:100vw!important;
    height:100dvh!important;
    max-height:100dvh!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
    border-radius:0!important;
    border:0!important;
    background:#101113!important;
  }
  body.ck-app-authenticated #newDevisModal .ck-new-quote-head,
  body.ck-app-authenticated #duplicateQuoteModal .ck-new-quote-head,
  body.ck-app-authenticated #newFactureModal .ck-new-quote-head{
    position:relative!important;
    top:auto!important;
    flex:0 0 auto!important;
    padding:calc(10px + env(safe-area-inset-top,0px)) 14px 12px!important;
    z-index:4!important;
  }
  body.ck-app-authenticated #newDevisModal .ck-new-quote-layout,
  body.ck-app-authenticated #duplicateQuoteModal .ck-new-quote-layout,
  body.ck-app-authenticated #newFactureModal .ck-new-quote-layout{
    flex:1 1 auto!important;
    min-height:0!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
    padding:10px 12px 24px!important;
  }
  body.ck-app-authenticated #newDevisModal .ck-new-quote-footer,
  body.ck-app-authenticated #duplicateQuoteModal .ck-new-quote-footer,
  body.ck-app-authenticated #newFactureModal .ck-new-quote-footer{
    position:relative!important;
    bottom:auto!important;
    flex:0 0 auto!important;
    z-index:5!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:8px!important;
    padding:10px 12px calc(10px + env(safe-area-inset-bottom,0px))!important;
    background:rgba(16,17,19,.985)!important;
    border-top:1px solid rgba(255,255,255,.09)!important;
    box-shadow:0 -12px 30px rgba(0,0,0,.28)!important;
  }
  body.ck-app-authenticated #newDevisModal .ck-new-quote-footer button,
  body.ck-app-authenticated #duplicateQuoteModal .ck-new-quote-footer button,
  body.ck-app-authenticated #newFactureModal .ck-new-quote-footer button{
    width:100%!important;
    min-height:50px!important;
    margin:0!important;
    padding:10px 12px!important;
    border-radius:13px!important;
    font-size:14px!important;
  }
  body.ck-app-authenticated #newDevisCreate,
  body.ck-app-authenticated #duplicateQuoteCreate,
  body.ck-app-authenticated #newFactureCreate{
    order:-1!important;
    min-height:56px!important;
    font-size:15px!important;
    font-weight:850!important;
  }
}

/* ===== CKLEAN MOBILE V8 — EDITEUR DEVIS : 3 VRAIS ECRANS ===== */
@media (max-width:760px){
  body.ck-document-editor-open #ckMobileNav{display:none!important}
  body.ck-document-editor-open{padding-bottom:0!important}

  #devisSheet[data-mobile-studio="1"]{padding-bottom:calc(92px + env(safe-area-inset-bottom,0px))!important}
  #devisSheet[data-mobile-studio="1"] .ck-quote-sheet-top{position:sticky!important;top:0!important;z-index:120!important;background:rgba(15,16,18,.985)!important}
  #devisSheet[data-mobile-studio="1"] .ck-mobile-editor-sections{position:sticky!important;top:calc(72px + env(safe-area-inset-top,0px))!important;z-index:115!important;margin:0!important;padding:8px 10px!important;background:rgba(15,16,18,.985)!important;border-bottom:1px solid rgba(255,255,255,.08)!important}

  /* Sur iPhone, chaque onglet est une vraie vue. */
  #devisSheet[data-mobile-view="lines"] .ck-quote-context-card,
  #devisSheet[data-mobile-view="lines"] .ck-quote-totals-bar{display:none!important}
  #devisSheet[data-mobile-view="context"] .ck-quote-lines-card,
  #devisSheet[data-mobile-view="context"] .ck-quote-totals-bar{display:none!important}
  #devisSheet[data-mobile-view="totals"] .ck-quote-lines-card,
  #devisSheet[data-mobile-view="totals"] .ck-quote-context-card{display:none!important}
  #devisSheet[data-mobile-view="lines"] .ck-quote-lines-card,
  #devisSheet[data-mobile-view="context"] .ck-quote-context-card,
  #devisSheet[data-mobile-view="totals"] .ck-quote-totals-bar{display:block!important}

  /* Studio : on retire le gros titre desktop et l'aide. */
  #devisSheet[data-mobile-view="lines"] .ck-quote-studio-bar{min-height:0!important;margin:0 0 8px!important;padding:0!important;border:0!important;background:transparent!important}
  #devisSheet[data-mobile-view="lines"] .ck-quote-studio-title,
  #devisSheet[data-mobile-view="lines"] .ck-quote-studio-actions,
  #devisSheet[data-mobile-view="lines"] .ck-quote-lines-help{display:none!important}
  #devisSheet[data-mobile-view="lines"] .ck-quote-lines-card{padding:10px!important;margin:0!important;border:0!important;background:transparent!important}
  #devisSheet[data-mobile-view="lines"] .ck-quote-lines-wrap{padding:0!important;margin:0!important}

  /* Cartes lignes plus compactes et naturelles au doigt. */
  #devisSheet[data-mobile-view="lines"] #linesBody>tr{margin:0 0 10px!important;padding:12px!important;border-radius:16px!important}
  #devisSheet[data-mobile-view="lines"] #linesBody>tr.ck-mobile-service-row{gap:9px 8px!important}
  #devisSheet[data-mobile-view="lines"] #linesBody .ck-rich-description{font-size:16px!important;line-height:1.4!important;min-height:58px!important;padding:12px!important}
  #devisSheet[data-mobile-view="lines"] .ck-mobile-edit-description{height:32px!important;min-height:32px!important;font-size:11px!important}
  #devisSheet[data-mobile-view="lines"] .ck-mobile-row-actions{min-height:42px!important;font-size:13px!important}

  /* Infos : uniquement les champs utiles, largeur téléphone. */
  #devisSheet[data-mobile-view="context"] .ck-quote-editor-grid{display:block!important;padding:10px!important}
  #devisSheet[data-mobile-view="context"] .ck-quote-context-card{margin:0!important;padding:14px!important;border-radius:18px!important}
  #devisSheet[data-mobile-view="context"] .ck-quote-context-card .sheetBlockHead{margin-bottom:12px!important}
  #devisSheet[data-mobile-view="context"] .ck-quote-field{margin-bottom:12px!important}
  #devisSheet[data-mobile-view="context"] .ck-quote-field input,
  #devisSheet[data-mobile-view="context"] .ck-quote-field select,
  #devisSheet[data-mobile-view="context"] .ck-quote-field textarea{font-size:16px!important;min-height:48px!important}

  /* Totaux : une vue courte, centrée, sans immense vide. */
  #devisSheet[data-mobile-view="totals"] .ck-quote-totals-bar{padding:12px 10px 20px!important;background:transparent!important}
  #devisSheet[data-mobile-view="totals"] .ck-quote-totals-bar>.sheetBlock{margin:0!important;padding:16px!important;border-radius:18px!important}
  #devisSheet[data-mobile-view="totals"] .ck-quote-discount{margin-bottom:16px!important}

  /* V9 : la barre Aperçu / Envoyer / Plus fait partie du document.
     Elle ne doit jamais suivre le scroll ni masquer les prestations. */
  #devisSheet[data-mobile-studio="1"] .ck-mobile-editor-footer,
  #factureSheet[data-mobile-studio="1"] .ck-mobile-editor-footer{
    position:relative!important;left:auto!important;right:auto!important;bottom:auto!important;inset:auto!important;
    z-index:3!important;margin:18px 10px calc(22px + env(safe-area-inset-bottom,0px))!important;padding:10px!important;
    grid-template-columns:1fr 1.25fr 1fr!important;background:#17191d!important;box-shadow:none!important
  }
  #devisSheet[data-mobile-studio="1"] .ck-mobile-editor-footer button,
  #factureSheet[data-mobile-studio="1"] .ck-mobile-editor-footer button{min-height:52px!important}
  body>.ck-mobile-editor-fab[data-editor-owner="quote"],
  body>.ck-mobile-editor-fab[data-editor-owner="invoice"]{right:16px!important;bottom:calc(16px + env(safe-area-inset-bottom,0px))!important;width:58px!important;height:58px!important;min-height:58px!important;border-radius:18px!important}
  #devisSheet[data-mobile-view="context"]~.ck-mobile-editor-fab,
  #devisSheet[data-mobile-view="totals"]~.ck-mobile-editor-fab{display:none!important}

  /* Le parcours en haut reste utile mais ne doit plus prendre un demi-écran. */
  #devisSheet .ck-quote-journey,
  #devisSheet .ck-quote-workflow,
  #devisSheet .ck-quote-lifecycle{font-size:10px!important;gap:4px!important;padding:7px 10px!important;overflow-x:auto!important;white-space:nowrap!important}
}

/* ===== V10 CLIENTS MOBILE — fiche simple, actions tactiles, liste lisible ===== */
@media (max-width: 820px){
  /* Liste clients : une vraie carte mobile, aucune colonne écrasée */
  body.ck-app-authenticated #clientsTbl tr{
    position:relative!important;display:grid!important;grid-template-columns:1fr auto!important;
    grid-template-areas:"identity menu" "location location" "docs docs"!important;
    gap:10px 12px!important;padding:16px!important;margin:10px 0!important;overflow:hidden!important;
  }
  body.ck-app-authenticated #clientsTbl td{min-width:0!important;padding:0!important}
  body.ck-app-authenticated #clientsTbl td:nth-child(1){grid-area:identity!important}
  body.ck-app-authenticated #clientsTbl td:nth-child(2),
  body.ck-app-authenticated #clientsTbl td:nth-child(3){display:none!important}
  body.ck-app-authenticated #clientsTbl td:nth-child(4){grid-area:location!important}
  body.ck-app-authenticated #clientsTbl td:nth-child(5){grid-area:docs!important}
  body.ck-app-authenticated #clientsTbl td:nth-child(6){grid-area:menu!important;align-self:start!important}
  body.ck-app-authenticated #clientsTbl .ck-client-identity{display:grid!important;grid-template-columns:48px minmax(0,1fr)!important;gap:12px!important;align-items:center!important}
  body.ck-app-authenticated #clientsTbl .clientAvatar{width:48px!important;height:48px!important;min-width:48px!important;border-radius:14px!important}
  body.ck-app-authenticated #clientsTbl .ck-client-identity b{display:block!important;font-size:17px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  body.ck-app-authenticated #clientsTbl .ck-client-identity small{display:block!important;margin-top:4px!important;font-size:11px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  body.ck-app-authenticated #clientsTbl .ck-client-location{display:block!important;padding-left:60px!important;text-decoration:none!important}
  body.ck-app-authenticated #clientsTbl .ck-client-location b{font-size:13px!important}.ck-client-location small{display:block!important;margin-top:3px!important;font-size:11px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  body.ck-app-authenticated #clientsTbl .ck-client-docs{padding-left:60px!important;gap:7px!important}
  body.ck-app-authenticated #clientsTbl .ck-client-docs button{min-height:34px!important;padding:7px 10px!important;font-size:11px!important;border-radius:10px!important}
  body.ck-app-authenticated #clientsTbl .ck-client-row-menu{width:44px!important;height:44px!important;min-height:44px!important;padding:0!important;border-radius:13px!important;font-size:18px!important}

  /* Menu ••• : bottom sheet mobile, plus de panneau géant au milieu */
  body.ck-app-authenticated .ck-client-context{
    position:fixed!important;left:10px!important;right:10px!important;top:auto!important;bottom:calc(var(--ck-mobile-nav-h) + env(safe-area-inset-bottom,0px) + 10px)!important;
    width:auto!important;max-width:none!important;max-height:min(72dvh,650px)!important;overflow-y:auto!important;
    border-radius:22px!important;padding:10px!important;z-index:10080!important;box-shadow:0 -18px 60px rgba(0,0,0,.55)!important;
  }
  body.ck-app-authenticated .ck-client-context-head{position:sticky!important;top:-10px!important;z-index:2!important;background:#18191d!important;padding:12px 10px!important;border-radius:16px 16px 0 0!important}
  body.ck-app-authenticated .ck-client-context>button,
  body.ck-app-authenticated .ck-context-danger button{min-height:52px!important;padding:9px 10px!important;border-radius:13px!important}
  body.ck-app-authenticated .ck-client-context button b{font-size:13px!important}.ck-client-context button small{font-size:10px!important}
  body.ck-app-authenticated .ck-context-label{margin:10px 10px 5px!important;font-size:9px!important}

  /* Fiche 360 : identité en haut, pas 5 boutons qui se chevauchent */
  body.ck-app-authenticated .ck-client360-head{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:10px!important;align-items:center!important;padding:12px 14px!important;min-height:86px!important}
  body.ck-app-authenticated .ck-client360-person{min-width:0!important}.ck-client360-person>span:last-child{min-width:0!important}
  body.ck-app-authenticated .ck-client360-person h3{font-size:20px!important;max-width:none!important}
  body.ck-app-authenticated .ck-client360-person small{max-width:100%!important;font-size:11px!important}
  body.ck-app-authenticated .ck-client360-head-actions{display:flex!important;gap:7px!important;justify-content:flex-end!important}
  body.ck-app-authenticated .ck-client360-head-actions #c360Organize,
  body.ck-app-authenticated .ck-client360-head-actions #c360Archive{display:none!important}
  body.ck-app-authenticated .ck-client360-head-actions #c360Edit,
  body.ck-app-authenticated .ck-client360-head-actions #c360Close{display:grid!important;place-items:center!important;width:44px!important;height:44px!important;min-height:44px!important;border-radius:13px!important}
  body.ck-app-authenticated .ck-client-create-menu{position:static!important}
  body.ck-app-authenticated .ck-client-create-menu>summary{width:auto!important;min-width:94px!important;height:44px!important;min-height:44px!important;padding:0 14px!important;font-size:14px!important;border-radius:13px!important;white-space:nowrap!important}
  body.ck-app-authenticated .ck-client-create-popover{position:fixed!important;left:12px!important;right:12px!important;top:auto!important;bottom:calc(var(--ck-mobile-nav-h) + env(safe-area-inset-bottom,0px) + 12px)!important;width:auto!important;max-height:65dvh!important;overflow:auto!important;z-index:10090!important;border-radius:20px!important}

  /* Appeler / WhatsApp / Email / Itinéraire toujours immédiatement visibles */
  body.ck-app-authenticated .ck-client360-actions{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important;margin:2px 0 14px!important}
  body.ck-app-authenticated .ck-client360-actions>.ck-client-action-widget{display:none!important;height:auto!important;min-width:0!important;grid-column:auto!important;grid-row:auto!important}
  body.ck-app-authenticated .ck-client360-actions>[data-client-action-item="call"],
  body.ck-app-authenticated .ck-client360-actions>[data-client-action-item="whatsapp"],
  body.ck-app-authenticated .ck-client360-actions>[data-client-action-item="email"],
  body.ck-app-authenticated .ck-client360-actions>[data-client-action-item="map"]{display:block!important}
  body.ck-app-authenticated .ck-client360-actions .ck-client-action-launch{width:100%!important;min-height:70px!important;padding:8px 3px!important;display:flex!important;flex-direction:column!important;gap:6px!important;border-radius:15px!important}
  body.ck-app-authenticated .ck-client360-actions .ck-client-action-launch span{width:30px!important;height:30px!important;flex-basis:30px!important}
  body.ck-app-authenticated .ck-client360-actions .ck-client-action-launch b{display:block!important;font-size:9px!important;white-space:nowrap!important}
  body.ck-app-authenticated .ck-client360-actions .ck-client-canvas-controls,
  body.ck-app-authenticated .ck-client360-actions .ck-client-resize,
  body.ck-app-authenticated .ck-client360-actions .ck-client-size-badge{display:none!important}

  body.ck-app-authenticated .ck-client360-body{padding:12px 12px calc(var(--ck-mobile-nav-h) + 26px + env(safe-area-inset-bottom,0px))!important}
  body.ck-app-authenticated .ck-client360-tabs{overflow-x:auto!important;flex-wrap:nowrap!important;-webkit-overflow-scrolling:touch!important}
  body.ck-app-authenticated .ck-client360-tabs button{flex:0 0 auto!important;white-space:nowrap!important}
}
@media (max-width:390px){
  body.ck-app-authenticated .ck-client360-actions{gap:5px!important}
  body.ck-app-authenticated .ck-client360-actions .ck-client-action-launch b{font-size:8px!important}
  body.ck-app-authenticated .ck-client360-head-actions #c360Edit{display:none!important}
}


/* CKlean reliability pass 2026-09-22: mobile editor controls */
@media (max-width:760px){
  .ck-mobile-edit-description,.ck-mobile-row-actions{pointer-events:auto!important;touch-action:manipulation!important;-webkit-tap-highlight-color:transparent!important;cursor:pointer!important}
  .ck-mobile-edit-description{z-index:30!important}
  .ck-mobile-row-actions{position:relative!important;z-index:30!important}
  .ck-mobile-move-pair{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;margin:2px 0 9px!important}
  .ck-mobile-move-pair button{grid-template-columns:34px 1fr!important;margin-top:0!important}
  body.ck-app-authenticated #linesBody .dragHandle,body.ck-app-authenticated #fLinesBody .dragHandle{touch-action:none!important}
}


/* CKlean 2026-09-22 — garde-fou desktop : les commandes tactiles ne doivent jamais occuper de place sur PC. */
@media (min-width:761px){
  .ck-mobile-edit-description,.ck-mobile-row-actions,.ck-mobile-editor-sections,.ck-mobile-editor-footer,
  body>.ck-mobile-editor-fab,.ck-mobile-rich-editor,.ck-mobile-row-menu,.ck-mobile-editor-menu{display:none!important}
}
