/* VETTER Pointeuse — charte VETTER (identique à VETTER Écrans / VETTER Gestion) */
:root {
  --bg: #F2F3F6; --card: #fff; --ink: #131A2A; --muted: #6B7385; --line: #DCDFE6;
  --brand: #7E1A52; --brand-2: #AB1263; --plum: #2E1526; --soft: #F2E6EC; --ok: #23804F; --warn: #f59e0b; --bad: #C22F2F;
  --display: var(--font);
  --radius: 14px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 4px 14px rgba(16,24,40,.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.45 var(--font); }
h1, h2, h3, .cb-name b, .cc-name { font-family: var(--display); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); }
.boot { padding: 80px; text-align: center; color: var(--muted); }
.hidden { display: none !important; }

/* ---------- En-tête ---------- */
header.top { position: sticky; top: 0; z-index: 20; background: var(--plum); color: #fff;
  display: flex; align-items: center; gap: 18px; padding: 0 20px; height: 62px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; color: #fff; white-space: nowrap; }
.logo b { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #fff; flex: none; }
.logo b svg { width: 27px; height: 27px; }
.logo span { font: 700 17px/1.05 var(--display); letter-spacing: .02em; }
.logo small { display: block; font: 400 12px var(--font); opacity: .7; letter-spacing: 0; }
nav.tabs { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
nav.tabs button { border: 0; background: none; padding: 9px 14px; border-radius: 10px; color: rgba(255,255,255,.75); font-weight: 600; white-space: nowrap; }
nav.tabs button.on { background: rgba(255,255,255,.14); color: #fff; }
.who { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.75); font-size: 13px; white-space: nowrap; }
.who span { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.linkbtn { border: 0; background: none; color: var(--muted); text-decoration: underline; padding: 0; font-size: 13px; }
header.top .linkbtn { color: rgba(255,255,255,.75); }
.dellink { border: 0; background: none; color: var(--bad); text-decoration: underline; padding: 0; font-size: 13px; }

main { max-width: 1280px; margin: 0 auto; padding: 24px 20px 80px; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 0 0 12px; }
.sub { color: var(--muted); margin: 0 0 22px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); }

.btn { border: 1px solid var(--line); background: #fff; padding: 9px 16px; border-radius: 10px; font-weight: 600; }
.btn:hover { border-color: #c5ccdb; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: #691545; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn.big { padding: 13px 22px; font-size: 16px; }
.btn:disabled { opacity: .5; cursor: default; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; background: #eef1f6; color: var(--muted); white-space: nowrap; }
.badge.ok { background: #dcfce7; color: #166534; }
.badge.warn { background: #fef3c7; color: #92400e; }
.badge.bad { background: #fee2e2; color: #991b1b; }
.badge.brand { background: var(--soft); color: var(--brand); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: #94a3b8; flex: none; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(22,163,74,.2); }
.dot.off { background: var(--bad); }
.dot.pause { background: var(--warn); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.grid > *, .shell > * { min-width: 0; }
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.panel + .panel { margin-top: 18px; }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.card .body { padding: 14px 16px 10px; flex: 1; }
.card .name { font-weight: 700; font-size: 16px; }
.card .meta { color: var(--muted); font-size: 13px; margin-top: 3px; }
.card .foot { display: flex; gap: 8px; padding: 0 12px 12px; }
.card .foot .btn { flex: 1; }
.add-card { border: 2px dashed #D9C3CF; border-radius: var(--radius); background: transparent; min-height: 170px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--brand); font-weight: 700; }
.add-card:hover { background: var(--soft); border-color: var(--brand-2); }
.add-card .plus { width: 64px; height: 64px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 38px; line-height: 62px; text-align: center; }

/* ---------- Tableaux ---------- */
.tw { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
table.t th, table.t td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
table.t td.n, table.t th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: #faf6f8; }
table.t tfoot td { font-weight: 800; border-bottom: 0; }
table.t .arch td { color: var(--muted); }

/* ---------- Fenêtres ---------- */
.overlay { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal { background: #fff; border-radius: 18px; padding: 24px; width: 100%; max-width: 460px; box-shadow: 0 20px 60px rgba(0,0,0,.25); max-height: 92vh; overflow: auto; }
.modal.wide { max-width: 760px; }
.modal h3 { margin: 0 0 6px; font-size: 19px; }
.modal p { color: var(--muted); margin: 0 0 16px; }
.modal label { display: block; font-weight: 600; font-size: 13px; margin: 14px 0 6px; }
.modal input[type=text], .modal input[type=email], .modal input[type=password], .modal input[type=number], .modal input[type=time],
.modal input[type=date], .modal select, .modal textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; }
.modal textarea { min-height: 64px; resize: vertical; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; align-items: center; flex-wrap: wrap; }
.modal .two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.pin { display: flex; gap: 8px; justify-content: center; margin: 8px 0; }
.pin input { width: 50px; height: 64px; text-align: center; font-size: 30px; font-weight: 800; border: 2px solid var(--line); border-radius: 12px; }
.pin input:focus { border-color: var(--brand); outline: none; }
.switch { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-weight: 600; font-size: 14px; }
.switch input { width: 20px; height: 20px; flex: none; }
.err { color: var(--bad); font-size: 14px; margin-top: 10px; min-height: 1em; }
.info { background: #f6f7fa; border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.info div + div { margin-top: 3px; }
.code10 { font: 800 26px/1 ui-monospace, monospace; letter-spacing: .18em; text-align: center; padding: 14px; background: var(--soft); color: var(--brand); border-radius: 12px; margin: 6px 0 10px; }

/* ---------- Connexion ---------- */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login .modal { max-width: 400px; box-shadow: 0 20px 60px rgba(46,21,38,.18); }
.login .logo { justify-content: center; font-size: 20px; margin-bottom: 16px; color: var(--plum); }
.login .logo b { background: var(--soft); }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 12px;
  font-weight: 600; opacity: 0; transition: opacity .25s; pointer-events: none; z-index: 99; max-width: 90vw; }
#toast.show { opacity: 1; }
#toast.bad { background: var(--bad); }

/* ---------- Bandeau « client en cours » ---------- */
.clientbar { position: sticky; top: 62px; z-index: 19; background: linear-gradient(90deg, #5E1640, #7E1A52 55%, #9A2366); color: #fff; box-shadow: 0 2px 8px rgba(126,26,82,.28); }
.cb-in { max-width: 1280px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cb-name { display: flex; flex-direction: column; line-height: 1.15; }
.cb-name small { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; opacity: .8; }
.cb-name b { font-size: 24px; display: inline-flex; align-items: center; }
.clientbar select { border-radius: 8px; padding: 6px 8px; border: 0; color: var(--ink); }
.cb-stats { display: flex; gap: 18px; font-size: 14px; opacity: .95; flex-wrap: wrap; }
.cb-stats b { font-size: 17px; }
.cb-ren { border: 0; background: rgba(255,255,255,.15); color: #fff; border-radius: 8px; width: 30px; height: 30px; font-size: 14px; margin-left: 6px; }
.cb-ren:hover { background: rgba(255,255,255,.28); }
.cb-acc { border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.12); color: #fff; border-radius: 10px; padding: 8px 14px; font-weight: 600; }
.cb-acc:hover { background: rgba(255,255,255,.22); }

/* ---------- Admin : menu de gauche (client en cours uniquement) ---------- */
.shell { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 62px); }
.shell.solo { grid-template-columns: 1fr; }
.side { background: var(--plum); color: #fff; padding: 16px 12px; position: sticky; top: 62px; height: calc(100vh - 62px); overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px; }
.side button { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; text-align: left; border-radius: 10px; color: rgba(255,255,255,.72); }
.curcli { padding: 10px 12px 12px; }
.curcli b { display: block; font: 700 18px/1.2 var(--display); color: #fff; }
.curcli small { display: block; margin-top: 3px; color: rgba(255,255,255,.6); font-size: 12px; }
.nav2 { padding: 10px 12px; font-weight: 600; font-size: 15px; }
.nav2:hover { background: rgba(255,255,255,.08); }
.nav2.on { background: rgba(255,255,255,.16); color: #fff; }
.nav-switch { margin-top: 6px; justify-content: center; background: rgba(255,255,255,.1) !important; color: #fff !important; border: 1px solid rgba(255,255,255,.22) !important; font-weight: 700; padding: 10px; }
.content { min-width: 0; }
.mswitch { display: none; }

/* ---------- Accueil admin : cartes clients ---------- */
.ccard { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; display: flex; flex-direction: column; gap: 10px;
  cursor: pointer; border: 2px solid transparent; transition: border-color .15s, transform .15s; }
.ccard:hover { border-color: var(--brand-2); transform: translateY(-2px); }
.cc-top { display: flex; align-items: flex-start; gap: 10px; justify-content: space-between; }
.cc-name { font-size: 19px; font-weight: 800; }
.cc-devs { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-dev { display: inline-flex; align-items: center; gap: 6px; background: #f1f4f9; border-radius: 8px; padding: 4px 9px; font-size: 13px; font-weight: 600; }
.cc-meta { color: var(--muted); font-size: 13px; }
.adminbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- Présence ---------- */
.kpis { display: flex; gap: 14px; flex-wrap: wrap; margin: 0 0 18px; }
.kpi { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 18px; min-width: 130px; }
.kpi b { display: block; font: 700 26px/1.1 var(--display); }
.kpi small { color: var(--muted); font-size: 13px; font-weight: 600; }
.kpi.ok b { color: var(--ok); } .kpi.warn b { color: #b45309; } .kpi.bad b { color: var(--bad); }
.pres { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.pcard { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; border-left: 5px solid #cbd5e1; cursor: pointer; }
.pcard.present { border-left-color: var(--ok); } .pcard.pause { border-left-color: var(--warn); } .pcard.parti { border-left-color: var(--brand); }
.pcard .pn { font-weight: 800; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.pcard .ps { color: var(--muted); font-size: 13px; margin-top: 2px; }
.pcard .pt { margin-top: 8px; display: flex; gap: 5px; flex-wrap: wrap; }

/* ---------- Pointages ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 0 0 16px; }
.toolbar select { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: #fff; font-weight: 600; max-width: 260px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: #fff; padding: 8px 14px; font-weight: 600; font-size: 14px; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--brand); color: #fff; }
.period { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.period button { border: 0; background: none; padding: 8px 12px; font-weight: 800; color: var(--brand); }
.period b { min-width: 170px; text-align: center; font-size: 14px; }
.day { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 16px; margin-bottom: 10px; }
.day .dh { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.day .dh .dd { font-weight: 800; min-width: 110px; text-transform: capitalize; }
.day .dh .tot { margin-left: auto; font: 700 18px var(--display); }
.day .ents { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.ent { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 5px 9px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ent:hover { border-color: var(--brand-2); }
.ent.k-in { background: #ecfdf3; border-color: #bbe5cb; } .ent.k-out { background: #f6eef2; border-color: #e3c8d6; }
.ent.k-break_start, .ent.k-break_end { background: #fff8e6; border-color: #f3dfa6; }
.ent.void { text-decoration: line-through; opacity: .55; background: #f3f4f6; border-color: var(--line); }
.ent i { font-style: normal; font-weight: 600; color: var(--muted); }
.anom { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.legend { color: var(--muted); font-size: 13px; margin-top: 12px; }
td.cell { text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.cell.has-a { background: #fff7e6; }
.hist td { font-size: 14px; }
.hist .why { color: var(--muted); font-style: italic; }

/* ---------- Réglages ---------- */
.set { display: grid; gap: 4px; max-width: 720px; }
.set .opt { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.set .opt:last-child { border-bottom: 0; }
.set .opt input[type=checkbox] { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.set .opt b { display: block; }
.set .opt small b { display: inline; }   /* mot en gras dans une explication : reste dans la phrase */
.set .opt small { color: var(--muted); font-size: 13px; }
.set select, .set input[type=number] { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fff; }

.bnav { display: none; }
@media (max-width: 900px) { .shell { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  input, select, textarea { font-size: 16px !important; } /* évite le zoom automatique de l'iPhone */
  header.top { height: 54px; padding: 0 14px; gap: 10px; }
  header.top nav.tabs, .who span { display: none; }
  .clientbar { top: 54px; }
  main { padding: 16px 14px 96px; }
  h1 { font-size: 20px; }
  .side { display: none; }
  .mswitch { display: inline-block; }
  .modal .two { grid-template-columns: 1fr; }
  .bnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--line);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(16,24,40,.06); }
  .bnav button { flex: 1; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 10px;
    font-weight: 700; font-size: 11px; color: var(--muted); }
  .bnav button span { font-size: 19px; line-height: 1.1; }
  .clientbar { position: static; }                 /* la bande du client ne mange plus l'écran en défilant */
  .palette { display: none; }                      /* glisser-déposer inutile au doigt : le « + » d'une case propose les mêmes choix */
  table.pl .pn { width: 104px; font-size: 13px; }
  table.pl td.pc { min-width: 96px; }
  .bnav button.on { color: var(--brand); background: var(--soft); }
}

/* bascule entre les applis VETTER (logo en haut à gauche, admins) */
.logo.appsw { cursor: pointer; border-radius: 10px; padding: 2px 6px 2px 2px; margin-left: -2px; }
.logo.appsw:hover { background: rgba(255,255,255,.1); }
.logo .sw { font-style: normal; opacity: .7; font-size: 13px; }
.appmenu { position: fixed; z-index: 1000; background: #fff; color: #1f1720; border: 1px solid #e5e0e4; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.25); padding: 6px; min-width: 240px; display: grid; gap: 2px; }
.appmenu a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 8px; font-weight: 600; color: inherit; text-decoration: none; }
.appmenu a[href]:hover { background: #f5f1f4; } .appmenu a[aria-current] { color: #A6176A; cursor: default; }
.appmenu small { display: block; font-weight: 400; color: #8a7f88; font-size: 12px; }

/* Heures : horaire corrigé mis en avant (heure d'origine barrée), travail et pause en bout de ligne */
.ent.corr { border-color: var(--brand-2); box-shadow: 0 0 0 2px rgba(171,18,99,.18); }
.ent.corr b { color: var(--brand); }
.ent s { font-weight: 500; color: var(--muted); }
.day .ents { align-items: center; }
.dtot { margin-left: auto; white-space: nowrap; font-size: 14px; color: var(--muted); }
.dtot b { font: 700 17px var(--display); color: var(--ink); margin-left: 4px; }
.dtot .sep { margin: 0 10px; }

/* Accueil admin : petites cartes clients, avec les tuiles complètes de leurs tablettes empilées */
.clist2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; align-items: start; }
.clist2 > * { min-width: 0; }
.clist2 .ccard .grid { grid-template-columns: 1fr; gap: 10px; }
.clist2 .ccard .card { box-shadow: none; border: 1px solid var(--line); }

/* ---------- Planning ---------- */
.pill { display: inline-block; min-width: 20px; padding: 1px 7px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 12px; font-weight: 800; text-align: center; }
.seg .pill { margin-left: 4px; }
.banner { background: #fff7e6; border: 1px solid #f5d28a; color: #7a4b00; border-radius: 12px; padding: 11px 16px; margin: 0 0 14px; font-weight: 600; cursor: pointer; }
.opt.inline { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 600; margin: 8px 0 0; }
.toolbar .opt.inline { margin: 0; }
kbd { background: #eef1f6; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; font: 12px var(--font); }
.palette { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; }
.chip { color: #fff; border-radius: 9px; padding: 5px 9px; font-size: 13px; line-height: 1.25; cursor: pointer; user-select: none; box-shadow: 0 1px 2px rgba(0,0,0,.18); position: relative; }
.chip b { display: block; font-weight: 700; }
.chip small { display: block; opacity: .88; font-size: 12px; }
.chip i { display: block; font-style: normal; font-size: 11px; background: rgba(0,0,0,.28); border-radius: 4px; padding: 0 4px; margin-top: 2px; }
.chip:hover { filter: brightness(1.08); transform: translateY(-1px); }
.chip.dragging { opacity: .4; }
.chip.tpl { cursor: grab; display: inline-block; }
.chip.clash { outline: 2px dashed #fff; outline-offset: -4px; opacity: .8; }
.panel.plan { padding: 0; overflow-x: auto; }
table.pl { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 900px; table-layout: fixed; }
table.pl th, table.pl td { border-bottom: 1px solid var(--line); border-right: 1px solid #eef0f4; vertical-align: top; padding: 6px; }
table.pl thead th { background: #fafafc; font-size: 13px; text-align: center; }
table.pl thead th.pd span { display: block; text-transform: capitalize; font-weight: 700; }
table.pl thead th small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; min-height: 16px; }
table.pl thead th.today, table.pl td.today { background: #fdf5f9; }
table.pl .hol { background: repeating-linear-gradient(135deg, #fafafa, #fafafa 8px, #f3f3f7 8px, #f3f3f7 16px); }
table.pl .pn { width: 150px; text-align: left; background: #fff; position: sticky; left: 0; z-index: 1; padding: 8px 10px; }
table.pl .pn b { display: block; }
table.pl .pn small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; line-height: 1.35; }   /* poste et heures sur leur propre ligne (plus de « Technicien0h00 ») */
table.pl .pn small.warn { color: #b45309; } table.pl .pn small.bad { color: var(--bad); font-weight: 700; } table.pl .pn small.ok { color: var(--ok); font-weight: 700; } table.pl .pn small.hc { white-space: nowrap; }
table.pl td.pc { height: 78px; position: relative; transition: background .12s; }
table.pl td.pc .chip + .chip { margin-top: 4px; }
table.pl td.pc.over { background: #f2e6ec; outline: 2px dashed var(--brand-2); outline-offset: -3px; }
table.pl td.pc { padding-bottom: 30px; }
table.pl td.pc .add { position: absolute; left: 4px; right: 4px; bottom: 4px; height: 22px; border-radius: 7px; border: 1px dashed #c5ccdb; background: #fff; color: var(--muted); font-weight: 700; font-size: 12px; line-height: 1; opacity: .75; transition: opacity .12s; padding: 0; cursor: pointer; }
table.pl td.pc:hover .add { opacity: 1; }
table.pl td.pc .add:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
@media (hover: none) { table.pl td.pc .add { opacity: .7; } }
table.pl tfoot th, table.pl tfoot td { border-bottom: 0; padding: 10px; }
.lv { font-size: 12px; font-weight: 700; padding: 3px 7px; border-radius: 8px; background: #dcfce7; color: #166534; margin-bottom: 4px; display: block; }
.lv.pend { background: #fef3c7; color: #92400e; border: 1px dashed #d9a441; }
.lv.maladie { background: #fee2e2; color: #991b1b; }
.cmp { font-size: 12px; margin-top: 5px; padding: 3px 6px; border-radius: 7px; background: #f3f4f8; color: #3b4254; }
.cmp.s-ok { background: #dcfce7; color: #166534; } .cmp.s-retard, .cmp.s-ecart { background: #fef3c7; color: #92400e; }
.cmp.s-absent { background: #fee2e2; color: #991b1b; font-weight: 700; } .cmp.s-non_prevu { background: #e0e7ff; color: #3730a3; } .cmp.s-en_cours { background: #dcfce7; color: #166534; }
.cmp em { font-style: normal; font-weight: 700; }
.cmp .cw { font-weight: 700; } .cmp small { display: block; opacity: .85; font-size: 11.5px; margin-top: 1px; }
.pop { position: fixed; z-index: 90; background: #fff; border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.25); padding: 10px; width: 250px; display: flex; flex-direction: column; gap: 6px; }
.pop-h { padding: 2px 4px 6px; } .pop-h b { display: block; } .pop-h small { color: var(--muted); text-transform: capitalize; }
.pop-tpl { border: 0; color: #fff; border-radius: 10px; padding: 9px 12px; text-align: left; font-size: 14px; }
.pop-tpl:hover { filter: brightness(1.1); }
.pop-b { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 12px; text-align: left; font-weight: 600; }
.pop-b:hover { border-color: var(--brand-2); }
.colors { display: flex; gap: 8px; flex-wrap: wrap; }
.colors label { margin: 0; cursor: pointer; }
.colors input { position: absolute; opacity: 0; }
.colors span { display: block; width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.colors input:checked + span { box-shadow: 0 0 0 3px var(--ink); }
table.tt input[type=text], table.tt input[type=time], table.tt input[type=number], table.tt select { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; width: 100%; background: #fff; }
.two3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.two3 label { display: block; font-weight: 600; font-size: 13px; margin: 12px 0 6px; }
.two3 input, .two3 select { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; }
.reqs { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.req { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border-left: 5px solid var(--warn); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.req-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.req-d { font-size: 16px; font-weight: 600; text-transform: capitalize; }
.req-i { font-size: 13px; background: #f6f7fa; border-radius: 8px; padding: 6px 10px; margin-top: 6px; } .req-i.bad { background: #fee2e2; color: #991b1b; } .req-i.warn { background: #fff7e6; color: #7a4b00; }
.req-a { display: flex; gap: 8px; }
table.pl td.pc.offd { background: repeating-linear-gradient(135deg, #f7f7fa, #f7f7fa 6px, #efeff4 6px, #efeff4 12px); }
.offl { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: #a0a6b6; display: block; margin-bottom: 2px; }
/* grille du planning allégée (12/10/2026) : horaire et durée sur une ligne, « Repos » au milieu de la case */
table.pl td.pc .chip b, table.pl td.pc .chip small { white-space: nowrap; }
table.pl td.pc .chip { padding: 5px 7px; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 4px; }   /* durée à côté de l'horaire, dessous seulement si la case est trop étroite */
table.pl td.pc .chip small { font-size: 12px; }
table.pl td.pc .chip i { flex-basis: 100%; }
table.pl td.pc.offd .offl { position: absolute; left: 0; right: 0; top: 0; bottom: 30px; display: flex; align-items: center; justify-content: center;
  margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0; pointer-events: none; }
.offs { display: flex; gap: 6px 14px; flex-wrap: wrap; }

/* menu « Plus » du planning (actions rares) */
details.more { position: relative; }
details.more > summary { list-style: none; cursor: pointer; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: " ▾"; font-size: 11px; }
.more-m { position: absolute; left: 0; top: calc(100% + 6px); z-index: 30; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 6px; display: grid; gap: 2px; min-width: 260px; }
.more-m button { border: 0; background: none; text-align: left; padding: 10px 12px; border-radius: 8px; font-weight: 600; color: inherit; cursor: pointer; }
.more-m button:hover { background: #f5f1f4; }

/* écran « aujourd'hui » : situation par rapport au prévu */
.pcard.pl-bad { border-left-color: var(--bad); background: #fff7f7; } .pcard.pl-warn { border-left-color: #d97706; }
.pcard .ps.plan { margin-top: 4px; font-size: 13.5px; color: #3b3340; }
.t-bad { color: var(--bad); } .t-warn { color: #b45309; } .t-ok { color: var(--ok); } .t-info { color: var(--brand); }

/* établissements d'un même groupe */
.estab { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; font-size: 14px; white-space: nowrap; }
.estab select { font-weight: 700; max-width: 240px; }
.grp-h { margin: 22px 0 10px; font-size: 18px; } .grp-h small { color: var(--muted); font-weight: 600; font-size: 13px; margin-left: 6px; }
.grp-h:first-of-type { margin-top: 6px; }
.grp { margin-bottom: 8px; } .grp .grp-h { margin-bottom: 2px; display: flex; align-items: center; gap: 4px; }
.grp-acc { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.grp-ren { color: var(--muted); background: transparent; border: 0; cursor: pointer; font-size: 14px; }
.btn.pubok { background: #dcfce7; color: #166534; border-color: #86efac; }
.btn.pubok:hover { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.tcols { gap: 5px; flex-wrap: nowrap; } .tcols span { width: 22px; height: 22px; border-width: 2px; }
.tcols label { position: relative; }
.pcopy { font-size: 12px; margin-left: 4px; }
.env { font-size: 1em; }
.envbtn .ic { width: 1.3em; height: 1.3em; }
.envbtn { display: inline-flex; align-items: center; gap: 6px; }
.mailok { display: inline-flex; align-items: center; gap: 6px; background: #16a34a; color: #fff; border-radius: 99px; padding: 3px 12px 3px 8px; font-size: 13px; font-weight: 600; margin-top: 3px; }
.mailko { display: inline-block; background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; border-radius: 8px; padding: 3px 10px; font-size: 13px; font-weight: 700; margin-top: 3px; }
/* congés : bloc plein, bien visible dans la grille */
table.pl .lv { font-size: 14px; font-weight: 800; padding: 9px 8px; border-radius: 10px; margin-bottom: 5px; text-align: center; color: #fff; background: #16a34a; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
table.pl .lv.ecole { background: #2563EB; } table.pl .lv.maladie { background: #dc2626; } table.pl .lv.sans_solde { background: #64748b; }
table.pl .lv.recup { background: #0891b2; } table.pl .lv.accident { background: #ea580c; } table.pl .lv.injustifiee { background: #7f1d1d; } table.pl .lv.autre { background: #7c3aed; }
table.pl .lv.pend { background: #fef3c7; color: #92400e; border: 2px dashed #d9a441; box-shadow: none; }

.cfacal { margin: 0 auto; user-select: none; }
.cfams { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.cfat { display: block; text-align: center; text-transform: capitalize; margin-bottom: 6px; }
.cfah, .cfag { display: grid; grid-template-columns: repeat(7, 1fr); }
.cfah b { text-align: center; font-size: 12px; color: var(--muted); padding-bottom: 4px; }
.cfad { text-align: center; padding: 10px 0; cursor: pointer; font-weight: 600; border-radius: 0; margin: 1px 0; }
.cfad:hover { background: #eef2ff; }
.cfad.on { background: #2563EB; color: #fff; }
.cfad.pv { background: #bfdbfe; color: #1e3a8a; } .cfad.pvx { background: #fecaca; color: #7f1d1d; }
.cfad.anc { outline: 2px solid var(--ink); outline-offset: -2px; border-radius: 8px; }

@media (hover: none) { .palette { display: none; } }

/* planning sur téléphone : un jour à la fois */
.dayview { display: none; }
@media (max-width: 760px) {
  .panel.plan { display: none; }
  .dayview { display: block; }
  .dstrip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 4px 0 12px; }
  .dchip { position: relative; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 7px 0; display: flex; flex-direction: column; align-items: center; gap: 1px; font: inherit; color: inherit; }
  .dchip small { font-size: 11px; color: var(--muted); text-transform: capitalize; } .dchip b { font-size: 16px; }
  .dchip.today { border-color: var(--brand); } .dchip.on { background: var(--brand); border-color: var(--brand); color: #fff; } .dchip.on small { color: #fff; }
  .dchip i { position: absolute; top: 4px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: #d97706; }
  .dtitle { display: flex; flex-direction: column; margin-bottom: 10px; } .dtitle b { font-size: 17px; text-transform: capitalize; } .dtitle small { color: var(--muted); }
  .dcard { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 10px 4px; margin-bottom: 10px; }
  .dname { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; } .dname small { color: var(--muted); font-size: 12px; }
  .dcard table.pl { width: 100%; border-collapse: collapse; } .dcard table.pl td.pc { display: block; height: auto; min-height: 56px; padding: 0 0 46px; }
  .dcard table.pl td.pc .add { height: 38px; font-size: 20px; left: 0; right: 0; bottom: 4px; opacity: 1; }
  .dcard table.pl td.pc.offd .offl { bottom: 46px; }
  .dcard .chip { padding: 10px 12px; } .dcard .lv { margin-bottom: 8px; }
}
@media (max-width: 760px) {
  .planning-x, div.palette { display: none !important; }
  .dcard table.pl { min-width: 0 !important; width: 100% !important; table-layout: fixed; }
  .dcard table.pl td.pc { width: 100% !important; min-width: 0 !important; box-sizing: border-box; }
  .toolbar { gap: 6px; } .toolbar .btn { padding: 8px 10px; font-size: 13.5px; }
}

.seg.full { display: flex; width: 100%; } .seg.full button { flex: 1; justify-content: center; }
.toolbar:has(.seg.full) { display: block; }
.wkpick { position: relative; display: inline-flex; cursor: pointer; padding: 0 6px; border-radius: 8px; } .wkpick:hover { background: var(--soft); }
.wkpick .wkin { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
/* fiches : champs côte à côte à la même hauteur, alignés en bas même si un libellé passe sur deux lignes */
.modal .two { align-items: end; }
.modal .two input, .modal .two select { height: 44px; box-sizing: border-box; }
.yn { align-items: center; } .ynb { display: inline-flex; gap: 14px; flex: none; } .ynb label { margin: 0; display: inline-flex; gap: 5px; align-items: center; cursor: pointer; font-weight: 600; font-size: 14px; }
.opt select { max-width: 100%; }
/* jours de repos sur une seule ligne dans la fiche salarié */
/* cases à cocher en pastilles dans les fenêtres (jours de repos, copier un horaire, semaine type) : largeur selon le texte,
   case DANS la pastille, passage à la ligne quand la place manque, jamais de défilement de côté (12/10/2026) */
.modal .offs { display: flex; flex-wrap: wrap; gap: 8px; overflow: visible; margin-top: 6px; }
.modal .offs .opt { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; padding: 0 14px; border: 1px solid var(--line); border-radius: 22px;
  background: rgba(255,255,255,.7); white-space: nowrap; cursor: pointer; max-width: 100%; }
.modal .offs .opt input { flex: none; margin: 0; }
.modal .offs .opt:has(input:checked) { background: var(--brand); border-color: var(--brand); color: #fff; }
.modal .offs .opt:has(input:checked) input { accent-color: #fff; }

/* calendrier d'alternance : import du PDF du CFA */
.cfapdf { display: flex; flex-direction: column; gap: 6px; padding: 12px; margin: 8px 0; border: 1px dashed var(--line); border-radius: 16px; }
.cfapdf .btn { align-self: flex-start; }

/* planning : vue du mois (13/10/2026) */
.panel.mplan { padding: 0; overflow-x: auto; }
table.pl.mtab { min-width: 0; table-layout: auto; }
table.pl.mtab .pn { min-width: 150px; }
table.pl.mtab th.md { padding: 4px 0; min-width: 34px; font-size: 12px; }
table.pl.mtab th.md small { min-height: 0; text-transform: uppercase; font-size: 10px; }
table.pl.mtab th.md b { display: block; font-size: 13px; }
table.pl.mtab td.mc { padding: 3px 2px; text-align: center; vertical-align: middle; height: 40px; cursor: pointer; }
@media (hover: hover) { table.pl.mtab td.mc:hover { background: #f2e6ec; } }
table.pl.mtab .wk { border-left: 2px solid #d9cfd5; }
.unpub { box-shadow: inset 0 -3px 0 #f59e0b; }
table.pl.mtab td.unpub { box-shadow: none; }
table.pl.mtab .alt { background-color: #f2e4ec; }   /* une semaine sur deux */
.unpubk { display: inline-block; width: 14px; height: 10px; border-radius: 3px; background: none; border-bottom: 3px solid #f59e0b; vertical-align: middle; }
.mh { display: inline-block; min-width: 28px; padding: 3px 3px; border-radius: 6px; color: #fff; font-weight: 800; font-size: 12px; line-height: 1.2; white-space: nowrap; }
.mlv { font-size: 16px; line-height: 1; } .mpd { font-size: 14px; } .mo { color: #b9b0b6; font-weight: 800; }
.mcal { display: none; }
@media (max-width: 760px) {
  .panel.mplan { display: none; }
  .mcal { display: block; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
  .mwho { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; text-align: center; }
  .mwho > div { flex: 1; display: flex; flex-direction: column; } .mwho b { font-size: 16px; } .mwho small { font-size: 12px; }
  .mwho small.ok { color: var(--ok); font-weight: 700; } .mwho small.bad { color: var(--bad); font-weight: 700; }
  .mwho .btn { min-width: 44px; min-height: 44px; }
  .mgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
  .mdh { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); }
  .mcd { min-height: 58px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 3px 1px; display: flex; flex-direction: column; align-items: center; gap: 3px; font: inherit; color: inherit; }
  .mcd small { font-size: 11px; color: var(--muted); }
  .mcd.today { border-color: var(--brand); border-width: 2px; }
  .mcd.hol { background: #f3f3f7; }
  .mcd.unpub { box-shadow: none; border-bottom: 3px solid #f59e0b; }
  .mcd.alt { background-color: #f2e4ec; }
  .mcd .mh { min-width: 0; padding: 2px 4px; font-size: 11px; }
}
table.pl.mtab td.mc.off, table.pl.mtab td.mc.off.unpub { background: #e9e6ea; }
@media (max-width: 760px) { .mcd.off, .mcd.off.unpub { background: #e9e6ea; } }

/* planning : vue du jour (13/10/2026) — frise des heures */
.panel.dplan { padding: 0; }
.dscroll { overflow-x: auto; }
.dgrid { min-width: calc(150px + var(--n) * 46px); }
.drow { display: flex; border-bottom: 1px solid var(--line); }
.drow .dn { flex: none; width: 150px; padding: 8px 10px; position: sticky; left: 0; z-index: 2; background: #fff; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; justify-content: center; }
.drow .dn b { font-size: 14px; } .drow .dn small { color: var(--muted); font-size: 12px; }
.dtrack { flex: 1; position: relative; display: grid; grid-template-columns: repeat(var(--n), 1fr); min-height: 58px; }
.dtrack > span { border-left: 1px solid #f0eaee; }
.drow:not(.dhead):not(.dcount) .dtrack { cursor: pointer; }
@media (hover: hover) { .drow:not(.dhead):not(.dcount) .dtrack:hover { background: #fbf6f9; } }
.dtrack.isoff { background: #e9e6ea; } .dtrack.isleave { background: #f4f1f5; }
.dhead .dtrack { min-height: 30px; } .dhead .dtrack > span { font-size: 12px; font-weight: 700; color: var(--muted); padding: 7px 0 0 4px; }
.dhead .dn, .dcount .dn { background: #fafafc; } .dhead, .dcount { background: #fafafc; }
.dcount .dtrack { min-height: 34px; } .dcount .dtrack > span { text-align: center; font-weight: 800; font-size: 14px; padding-top: 8px; color: var(--brand); }
.dcount .dtrack > span.z { color: #c9c0c6; font-weight: 600; }
.dbar { position: absolute; top: 8px; height: 32px; border: 0; border-radius: 9px; color: #fff; padding: 0 8px; display: flex; align-items: center; gap: 6px;
  overflow: hidden; white-space: nowrap; font: inherit; font-size: 13px; box-shadow: 0 1px 3px rgba(0,0,0,.18); cursor: pointer; z-index: 1; }
.dbar small { opacity: .85; font-size: 11.5px; }
.dwork { position: absolute; bottom: 7px; height: 6px; border-radius: 3px; background: #16a34a; z-index: 1; }
.dnote { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--muted); font-weight: 600; z-index: 1; white-space: nowrap; }
.dnote.lv { color: #fff; padding: 6px 10px; border-radius: 9px; background: #16a34a; margin: 0; }
.dnote.lv.ecole { background: #2563EB; } .dnote.lv.maladie { background: #dc2626; } .dnote.lv.sans_solde { background: #64748b; }
.dnote.lv.recup { background: #0891b2; } .dnote.lv.accident { background: #ea580c; } .dnote.lv.injustifiee { background: #7f1d1d; } .dnote.lv.autre { background: #7c3aed; }
.dnow { position: absolute; top: 0; bottom: -2000px; width: 2px; background: var(--brand); opacity: .55; z-index: 0; pointer-events: none; }
.dgrid { position: relative; overflow: hidden; }
@media (max-width: 760px) {
  .drow .dn { width: 104px; padding: 6px 8px; } .drow .dn b { font-size: 13px; }
  .dgrid { min-width: calc(104px + var(--n) * 44px); }
  .dtrack { min-height: 62px; } .dbar { height: 38px; }
}

/* semaine : nom, poste et heures sur 3 lignes fixes → toutes les lignes salariés ont la même hauteur ; colonne plus large sur grand écran */
table.pl:not(.mtab) .pn small.hc { overflow: hidden; text-overflow: ellipsis; }
.panel.plan table.pl thead th:first-child, .panel.plan table.pl .pn { width: 210px; }   /* largeur fixée par la 1re ligne (tableau à largeur fixe) */
.panel.plan table.pl .pn b, .panel.plan table.pl .pn small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel.plan table.pl td.pc { height: 84px; }   /* même hauteur pour toutes les lignes salariés */
/* absence dans la grille semaine : même taille qu'un horaire (13/10/2026) */
table.pl td.pc .lv { font-size: 13px; font-weight: 700; line-height: 1.25; padding: 5px 7px; border-radius: 9px; margin-bottom: 4px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 1px 2px rgba(0,0,0,.18); }

/* Pointage « Tous » : journées d'un salarié dépliées sous sa ligne (13/10/2026) */
table.t tr.click.open > td { background: var(--soft); }
table.t tr.click > td:first-child b::before { content: "▸ "; color: var(--muted); }
table.t tr.click.open > td:first-child b::before { content: "▾ "; }
table.t tr.exp > td { padding: 4px 8px 12px; background: #fbf7f9; }
.empx .day { margin: 6px 0; }
