
/* COBAT V2.3.32 — Pointage chantier mobile
   Surcouche téléphone uniquement. Le moteur et la DA PC restent inchangés. */
@media (max-width:767px){
  html[data-cobat-module="pointage"],
  html[data-cobat-module="pointage"] body{
    background:#f5f8fb!important;
  }

  body.module-pointage.cobat-pointage-mobile-v2332{
    padding-bottom:calc(78px + env(safe-area-inset-bottom))!important;
    overflow-x:hidden!important;
  }

  body.module-pointage.cobat-pointage-mobile-v2332 > .app{
    display:none!important;
    visibility:hidden!important;
    position:absolute!important;
    left:-200vw!important;
    width:1px!important;
    height:1px!important;
    overflow:hidden!important;
    pointer-events:none!important;
  }

  #cobatPointageMobileV2330{
    display:block;
    min-height:100dvh;
    background:#f5f8fb;
    color:#17324d;
    font-family:Arial,Helvetica,sans-serif;
    padding-bottom:18px;
  }

  .cpm30-topbar{
    position:sticky;top:0;z-index:170;
    height:68px;padding:8px 11px;
    display:grid;grid-template-columns:minmax(100px,124px) minmax(0,1fr) 44px;
    gap:8px;align-items:center;
    background:rgba(255,255,255,.97);
    border-bottom:1px solid #dce5ee;
    backdrop-filter:blur(12px);
  }
  .cpm30-logo{display:flex;align-items:center;min-width:0}
  .cpm30-logo img{
    display:block;width:100%;max-width:120px;max-height:44px;
    object-fit:contain;object-position:left center;
  }
  .cpm30-project{
    height:44px;min-width:0;padding:0 9px;
    display:flex;align-items:center;justify-content:center;gap:7px;
    border:1px solid #cbd9e7;border-radius:12px;background:#fff;
    color:#173a5b;font:900 12px Arial;white-space:nowrap;
    overflow:hidden;text-overflow:ellipsis;
  }
  .cpm30-project svg{width:18px;height:18px;flex:0 0 auto;color:#0d4ca3}
  .cpm30-sync{
    width:42px;height:42px;min-width:42px!important;min-height:42px!important;
    border:0;border-radius:11px;background:transparent;color:#0d4ca3;
    display:grid;place-items:center;padding:0!important;position:relative;
  }
  .cpm30-sync svg{width:23px;height:23px}
  .cpm30-sync.busy svg{animation:cpm30spin .75s linear infinite}
  @keyframes cpm30spin{to{transform:rotate(360deg)}}

  .cpm30-main{padding:14px 12px 8px}
  .cpm30-heading{
    display:flex;align-items:center;gap:10px;margin:2px 2px 12px;
  }
  .cpm30-heading-icon{
    width:44px;height:44px;display:grid;place-items:center;flex:0 0 auto;
    border-radius:14px;background:#edf4fb;border:1px solid #dce8f4;color:#0d4ca3;
  }
  .cpm30-heading-icon svg{width:25px;height:25px}
  .cpm30-heading h1{margin:0;color:#12365a;font:950 23px/1.05 Arial}
  .cpm30-heading p{margin:4px 0 0;color:#6d8194;font:750 10px/1.25 Arial}

  .cpm30-subnav{
    display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
    border:1px solid #d8e3ed;border-radius:13px;overflow:hidden;background:#fff;
    margin:0 0 11px;
  }
  .cpm30-subnav button{
    min-height:43px!important;border:0;border-right:1px solid #e2e9ef;background:#fff;
    color:#34516b;font:850 10px Arial;padding:4px!important;
  }
  .cpm30-subnav button:last-child{border-right:0}
  .cpm30-subnav button.active{background:#0d4ca3;color:#fff}

  .cpm30-kpis{
    display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:11px;
  }
  .cpm30-kpi{
    min-height:82px;background:#fff;border:1px solid #dce5ee;border-radius:14px;
    padding:10px;display:grid;grid-template-columns:38px 1fr;gap:8px;align-items:center;
    box-shadow:0 2px 8px rgba(27,57,84,.035);
  }
  .cpm30-kpi-icon{
    width:38px;height:38px;border-radius:12px;display:grid;place-items:center;
    background:#eef5fc;color:#0d4ca3;
  }
  .cpm30-kpi-icon svg{width:21px;height:21px}
  .cpm30-kpi.attn .cpm30-kpi-icon{background:#fff2f4;color:#a71930}
  .cpm30-kpi strong{display:block;color:#12365a;font:950 23px/1 Arial}
  .cpm30-kpi.attn strong{color:#a71930}
  .cpm30-kpi span{display:block;margin-top:5px;color:#62798e;font:800 9px/1.25 Arial}

  .cpm30-primary{
    width:100%;min-height:56px!important;border:0;border-radius:14px;
    display:flex;align-items:center;justify-content:center;gap:9px;
    background:#0d4ca3;color:#fff;font:950 13px Arial;
    box-shadow:0 5px 15px rgba(13,76,163,.17);padding:0 14px!important;
  }
  .cpm30-primary svg{width:22px;height:22px}

  .cpm30-home-note{
    margin-top:10px;padding:10px 12px;background:#fff;border:1px solid #dce5ee;border-radius:13px;
    color:#667d92;font:750 9px/1.4 Arial;
  }

  .cpm30-datebar{
    display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:7px;align-items:center;
    margin-bottom:8px;
  }
  .cpm30-datebtn{
    height:44px!important;border:1px solid #d8e3ed;border-radius:12px;background:#fff;color:#0d4ca3;
    display:grid;place-items:center;padding:0!important;
  }
  .cpm30-datebtn svg{width:19px;height:19px}
  .cpm30-datecenter{
    min-height:44px;display:flex;align-items:center;justify-content:center;flex-direction:column;
    border:1px solid #d8e3ed;border-radius:12px;background:#fff;color:#173a5b;
  }
  .cpm30-datecenter strong{font:950 11px Arial}
  .cpm30-datecenter span{margin-top:2px;color:#71869a;font:800 8px Arial}

  .cpm30-dayactions{
    display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin-bottom:9px;
  }
  .cpm30-prefill{
    min-height:43px!important;border:1px solid #b8cfe5;border-radius:12px;background:#eef5fc;color:#0d4ca3;
    font:900 10px Arial;padding:0 12px!important;
  }
  .cpm30-today{
    min-height:43px!important;border:1px solid #d8e3ed;border-radius:12px;background:#fff;color:#566f85;
    font:850 9px Arial;padding:0 12px!important;
  }

  .cpm30-tabs{
    display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
    border:1px solid #d8e3ed;border-radius:13px;overflow:hidden;background:#fff;margin-bottom:9px;
  }
  .cpm30-tab{
    min-height:42px!important;border:0;border-right:1px solid #e2e9ef;background:#fff;
    color:#34516b;font:850 9px Arial;padding:3px!important;white-space:nowrap;
  }
  .cpm30-tab:last-child{border-right:0}
  .cpm30-tab.active{background:#0d4ca3;color:#fff}
  .cpm30-tab em{
    display:inline-flex;align-items:center;justify-content:center;min-width:17px;height:17px;
    margin-left:2px;padding:0 4px;border-radius:9px;background:#edf3f8;color:#60768a;
    font:900 8px Arial;font-style:normal;
  }
  .cpm30-tab.active em{background:rgba(255,255,255,.2);color:#fff}

  .cpm30-list{display:grid;gap:8px}
  .cpm30-person{
    background:#fff;border:1px solid #dce5ee;border-radius:14px;padding:10px;
    box-shadow:0 2px 8px rgba(24,57,86,.03);
  }
  .cpm30-person-head{
    display:grid;grid-template-columns:45px minmax(0,1fr) auto;gap:8px;align-items:center;
  }
  .cpm30-avatar{
    width:45px;height:45px;border-radius:50%;display:grid;place-items:center;
    background:#edf4fc;color:#0d4ca3;font:950 17px Arial;
  }
  .cpm30-name{color:#12365a;font:950 12px/1.15 Arial}
  .cpm30-role{margin-top:3px;color:#6d8296;font:750 9px Arial}
  .cpm30-company{margin-top:2px;color:#0d4ca3;font:850 8px Arial;text-transform:uppercase}
  .cpm30-value{
    min-width:43px;text-align:right;color:#173a5b;font:950 12px Arial;
  }
  .cpm30-value.status{color:#a71930}

  .cpm30-hours{
    display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px;margin-top:9px;
  }
  .cpm30-hour{
    min-width:0;min-height:39px!important;border:1px solid #b9cde0;border-radius:9px;background:#fff;
    color:#0d4ca3;font:900 9px Arial;padding:0 2px!important;
  }
  .cpm30-hour.primary{border-color:#0d4ca3;background:#eef5fc}
  .cpm30-hour.selected{background:#0d4ca3;border-color:#0d4ca3;color:#fff}
  .cpm30-hour.status.selected{background:#a71930;border-color:#a71930;color:#fff}
  .cpm30-hour.status{border-color:#dfbcc2;color:#8f1b2e;background:#fff}
  .cpm30-hour:disabled{opacity:.45;pointer-events:none}
  .cpm30-contract{
    margin-top:7px;padding:6px 8px;border-radius:8px;background:#f4f6f8;color:#748597;font:750 8px Arial;
  }

  .cpm30-sticky{
    position:sticky;bottom:calc(70px + env(safe-area-inset-bottom));z-index:130;
    margin:10px -2px 0;padding:9px 11px;border:1px solid #d9e4ee;border-radius:13px;
    background:rgba(255,255,255,.97);backdrop-filter:blur(9px);
    display:flex;align-items:center;justify-content:space-between;gap:8px;
    box-shadow:0 -5px 16px rgba(20,50,75,.07);
  }
  .cpm30-sticky strong{font:950 10px Arial;color:#173a5b}
  .cpm30-sticky span{font:750 8px Arial;color:#74879a}
  .cpm30-save-state{display:flex;align-items:center;gap:5px;white-space:nowrap}
  .cpm30-save-dot{width:7px;height:7px;border-radius:50%;background:#2c9a69}
  .cpm30-save-state.busy .cpm30-save-dot{background:#c37a13}

  .cpm30-team-card,.cpm30-month-card{
    width:100%;border:1px solid #dce5ee;border-radius:13px;background:#fff;
    padding:10px;display:grid;gap:4px;text-align:left;
  }
  .cpm30-team-card strong,.cpm30-month-card strong{font:950 11px Arial;color:#173a5b}
  .cpm30-team-card span,.cpm30-month-card span{font:750 8px Arial;color:#6f8397}
  .cpm30-team-tags{display:flex;gap:5px;flex-wrap:wrap;margin-top:4px}
  .cpm30-tag{
    display:inline-flex;align-items:center;min-height:22px;padding:0 7px;border-radius:8px;
    border:1px solid #d7e3ee;background:#f4f8fc;color:#0d4ca3;font:850 8px Arial;
  }

  .cpm30-month-head{
    display:grid;grid-template-columns:42px minmax(0,1fr) 42px;gap:7px;margin-bottom:9px;
  }
  .cpm30-month-title{
    min-height:42px;border:1px solid #d8e3ed;border-radius:12px;background:#fff;
    display:grid;place-items:center;color:#173a5b;font:950 11px Arial;text-transform:capitalize;
  }
  .cpm30-days{display:grid;gap:6px}
  .cpm30-dayrow{
    width:100%;min-height:56px;border:1px solid #dce5ee;border-radius:12px;background:#fff;
    display:grid;grid-template-columns:54px minmax(0,1fr) auto;gap:8px;align-items:center;padding:8px 10px!important;text-align:left;
  }
  .cpm30-dayrow .date{color:#0d4ca3;font:950 10px Arial}
  .cpm30-dayrow .meta{color:#71869a;font:750 8px Arial}
  .cpm30-dayrow .sum{text-align:right;color:#173a5b;font:900 9px Arial}
  .cpm30-dayrow.weekend{background:#fafbfc}

  .cpm30-empty{
    padding:24px 13px;border:1px dashed #cdd9e4;border-radius:14px;background:#fff;
    text-align:center;color:#72879a;font:800 9px/1.45 Arial;
  }

  .cpm30-sheet-back{
    position:fixed;inset:0;z-index:520;background:rgba(14,34,52,.34);
    opacity:0;pointer-events:none;transition:opacity .18s;
  }
  .cpm30-sheet-back.open{opacity:1;pointer-events:auto}
  .cpm30-sheet{
    position:fixed;left:0;right:0;bottom:-100%;z-index:530;background:#fff;
    border-radius:20px 20px 0 0;padding:9px 14px calc(18px + env(safe-area-inset-bottom));
    box-shadow:0 -18px 48px rgba(18,46,70,.2);transition:bottom .2s;
  }
  .cpm30-sheet.open{bottom:0}
  .cpm30-handle{width:46px;height:5px;border-radius:4px;background:#c9d2da;margin:2px auto 13px}
  .cpm30-sheet h3{margin:0 0 10px;color:#173a5b;font:950 17px Arial}
  .cpm30-sheet p{margin:0 0 10px;color:#708497;font:750 9px/1.4 Arial}
  .cpm30-custom-input{
    width:100%;height:48px;border:1px solid #d8e3ed;border-radius:12px;padding:0 12px;
    font:900 17px Arial;color:#173a5b;outline:none;
  }
  .cpm30-sheet-actions{display:grid;grid-template-columns:1fr 1.4fr;gap:8px;margin-top:11px}
  .cpm30-sheet-actions button{height:46px!important;border-radius:12px;font:900 10px Arial}
  .cpm30-cancel{background:#fff;border:1px solid #d8e3ed;color:#60778d}
  .cpm30-confirm{background:#0d4ca3;border:0;color:#fff}

  /* Navigation basse globale : même esprit que Plans / Registre. */
  body.module-pointage.cobat-pointage-mobile-v2332 #cobatMobileBottomNav{
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
  }

  @media(max-width:390px){
    .cpm30-topbar{grid-template-columns:98px minmax(0,1fr) 42px;padding-left:8px;padding-right:8px}
    .cpm30-logo img{max-width:96px}
    .cpm30-heading h1{font-size:21px}
    .cpm30-hours{gap:4px}
    .cpm30-hour{font-size:8px}
  }
}


/* ============================================================
   COBAT V2.3.31 — MOIS : TABLEAU MENSUEL MOBILE
   Vue compacte proche du tableau PC :
   salarié en ligne, jours en colonnes, total à droite.
   ============================================================ */
@media (max-width:767px){
  .cpm31-month-intro{
    margin:0 0 8px;
    padding:8px 10px;
    border:1px solid #dce5ee;
    border-radius:11px;
    background:#fff;
    color:#71869a;
    font:750 8px/1.35 Arial;
  }

  .cpm31-table-shell{
    width:100%;
    max-height:62dvh;
    overflow:auto;
    border:1px solid #d6e1eb;
    border-radius:13px;
    background:#fff;
    box-shadow:0 2px 8px rgba(24,57,86,.035);
    -webkit-overflow-scrolling:touch;
    overscroll-behavior:contain;
    scrollbar-width:thin;
  }

  .cpm31-timesheet{
    border-collapse:separate;
    border-spacing:0;
    width:max-content;
    min-width:100%;
    table-layout:fixed;
    background:#fff;
    color:#17324d;
    font-family:Arial,Helvetica,sans-serif;
  }

  .cpm31-timesheet th,
  .cpm31-timesheet td{
    height:39px;
    padding:0;
    border-right:1px solid #e2e9ef;
    border-bottom:1px solid #e2e9ef;
    text-align:center;
    background:#fff;
    vertical-align:middle;
  }

  .cpm31-timesheet thead th{
    position:sticky;
    top:0;
    z-index:8;
    height:48px;
    background:#f7f9fb;
    color:#466078;
    font:850 8px Arial;
  }

  .cpm31-timesheet .cpm31-person-head,
  .cpm31-timesheet .cpm31-person-cell{
    position:sticky;
    left:0;
    z-index:10;
    width:122px;
    min-width:122px;
    max-width:122px;
    text-align:left;
    background:#fff;
    box-shadow:5px 0 8px rgba(31,61,87,.05);
  }

  .cpm31-timesheet thead .cpm31-person-head{
    z-index:14;
    padding:0 8px;
    background:#f7f9fb;
    color:#173a5b;
    font:950 9px Arial;
  }

  .cpm31-person-box{
    height:100%;
    display:flex;
    align-items:center;
    gap:6px;
    padding:5px 7px;
    overflow:hidden;
  }

  .cpm31-person-avatar{
    width:29px;
    height:29px;
    border-radius:50%;
    display:grid;
    place-items:center;
    flex:0 0 auto;
    background:#edf4fc;
    color:#0d4ca3;
    font:950 10px Arial;
  }

  .cpm31-person-copy{
    min-width:0;
    display:block;
  }

  .cpm31-person-copy strong{
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    color:#173a5b;
    font:900 8px Arial;
  }

  .cpm31-person-copy span{
    display:block;
    margin-top:2px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    color:#72869a;
    font:750 7px Arial;
  }

  .cpm31-day-head{
    width:42px;
    min-width:42px;
    max-width:42px;
  }

  .cpm31-day-btn{
    width:100%;
    height:48px;
    border:0;
    background:transparent;
    color:inherit;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:2px;
    padding:0!important;
  }

  .cpm31-day-btn .dow{
    font:850 7px Arial;
    text-transform:uppercase;
  }

  .cpm31-day-btn .num{
    font:950 11px Arial;
    color:#173a5b;
  }

  .cpm31-day-head.weekend,
  .cpm31-timesheet td.weekend{
    background:#f5f7f9;
  }

  .cpm31-day-head.today{
    background:#eaf3fd!important;
    box-shadow:inset 0 3px 0 #0d4ca3;
  }

  .cpm31-day-head.today .num{
    color:#0d4ca3;
  }

  .cpm31-cell{
    width:42px;
    min-width:42px;
    max-width:42px;
  }

  .cpm31-cell-btn{
    width:100%;
    height:38px;
    border:0;
    background:transparent;
    color:#8a9aa9;
    font:850 9px Arial;
    padding:0!important;
  }

  .cpm31-cell-btn.filled{
    color:#0d4ca3;
    font-weight:950;
  }

  .cpm31-cell-btn.status{
    color:#a71930;
    background:#fff3f4;
    font-size:8px;
  }

  .cpm31-cell-btn.outside{
    color:#c2ccd5;
    background:#f7f8f9;
  }

  .cpm31-cell-btn:active,
  .cpm31-day-btn:active{
    background:#edf4fc;
  }

  .cpm31-total-head,
  .cpm31-total-cell{
    width:54px;
    min-width:54px;
    max-width:54px;
    background:#f7f9fb!important;
    color:#173a5b!important;
    font:950 8px Arial!important;
  }

  .cpm31-summary th,
  .cpm31-summary td{
    background:#f7f9fb!important;
    color:#4f667c;
    font:850 8px Arial;
  }

  .cpm31-summary .cpm31-person-cell{
    z-index:11;
    padding:0 7px;
    background:#f7f9fb!important;
    color:#173a5b;
    font:950 8px Arial;
  }

  .cpm31-summary-hours td{
    color:#0d4ca3;
    font-weight:950;
  }

  .cpm31-table-legend{
    display:flex;
    flex-wrap:wrap;
    gap:5px 10px;
    margin:8px 2px 0;
    color:#71869a;
    font:750 7px Arial;
  }

  .cpm31-legend-item{
    display:inline-flex;
    align-items:center;
    gap:4px;
  }

  .cpm31-legend-dot{
    width:8px;
    height:8px;
    border-radius:3px;
    background:#edf4fc;
    border:1px solid #cbdced;
  }

  .cpm31-legend-dot.status{
    background:#fff1f3;
    border-color:#efc6cd;
  }

  .cpm31-legend-dot.weekend{
    background:#f2f4f6;
    border-color:#d8dfe5;
  }

  @media (orientation:landscape){
    .cpm31-table-shell{
      max-height:54dvh;
    }
    .cpm31-timesheet .cpm31-person-head,
    .cpm31-timesheet .cpm31-person-cell{
      width:150px;
      min-width:150px;
      max-width:150px;
    }
  }
}


/* COBAT V2.3.32 — isolation forte Pointage PC / téléphone */
@media (max-width:767px){
  body.module-pointage.cobat-pointage-mobile-v2332 > .app{
    display:none!important;
    visibility:hidden!important;
    position:absolute!important;
    left:-200vw!important;
    top:0!important;
    width:1px!important;
    height:1px!important;
    min-width:0!important;
    min-height:0!important;
    max-width:1px!important;
    max-height:1px!important;
    overflow:hidden!important;
    opacity:0!important;
    pointer-events:none!important;
    margin:0!important;
    padding:0!important;
  }

  body.module-pointage.cobat-pointage-mobile-v2332 > #cobatPointageMobileV2332{
    display:block!important;
    visibility:visible!important;
    position:relative!important;
    z-index:2!important;
  }
}
