/* Espace employé : Mon horaire et Mes disponibilités (module C).
   Mobile d'abord : tout tient en une colonne dès 360 px, sans défilement horizontal. */

.emp-page{display:flex;flex-direction:column;gap:14px;min-width:0}
.emp-page>.page-head{margin-bottom:0}
.emp-lead{margin:-6px 0 0;color:var(--muted);font-size:14px;max-width:70ch}
.emp-lead b{color:var(--ink);font-weight:600}
.emp-h2{font-family:var(--f-display);font-variation-settings:"wdth" 85;font-weight:700;font-size:17px;margin:0 0 10px}
.emp-err-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:12px}
.emp-err-row .errbox{flex:1 1 240px}
.emp-err{font-size:12.5px;color:var(--bad);font-weight:600}

/* ---------- Morceaux d'un quart ---------- */
.emp-pos{display:inline-flex;align-items:center;gap:6px;font-weight:600;font-size:13px;min-width:0}
.emp-pos .dot{width:10px;height:10px;border-radius:3px;background:var(--c,var(--muted));flex:none}
.emp-hours{display:flex;flex-wrap:wrap;align-items:baseline;gap:0 2px;min-width:0}
.emp-hours b{font-size:15px;font-weight:600}
.emp-hours .muted{font-size:12.5px}
.emp-notes{display:flex;flex-direction:column;gap:6px}
.emp-note{margin:0;padding:8px 10px;border-radius:8px;background:var(--sunk);font-size:13px;overflow-wrap:anywhere;white-space:pre-line}
.emp-note.mine{background:var(--bad-soft)}
.emp-note.reply{background:var(--info-soft)}
.emp-note.warn{background:var(--warn-soft)}
.emp-note-lab{display:block;font-size:10.5px;font-weight:600;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);margin-bottom:2px}

/* ---------- Réponse ---------- */
.emp-actions{display:flex;flex-wrap:wrap;gap:8px}
.emp-actions .btn.big{flex:1 1 150px}
.emp-dispute{display:flex;flex-direction:column;gap:6px}
.emp-why{font-weight:600;font-size:13.5px}
.emp-dispute textarea{min-height:76px}
.emp-dispute textarea[aria-invalid="true"]{border-color:var(--bad)}

/* ---------- À confirmer ---------- */
.emp-confirm{border-color:var(--info);box-shadow:inset 0 3px 0 var(--info)}
.emp-confirm-top{display:flex;align-items:center;gap:8px}
.emp-confirm-top h2{margin:0}
.emp-confirm .lead{margin:4px 0 12px}
.emp-confirm-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,320px),1fr));gap:10px}
.emp-confirm-item{display:flex;flex-direction:column;gap:8px;padding:12px 14px;border:1px solid var(--line);border-left:4px solid var(--c,var(--line-strong));border-radius:10px;background:var(--surface);min-width:0}
.emp-confirm-head{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px}
.emp-confirm-head h3{font-family:var(--f-display);font-variation-settings:"wdth" 85;font-weight:700;font-size:17px;margin:0;line-height:1.2}
.emp-changed{margin:0;font-size:12.5px;color:var(--warn);font-weight:600}

/* ---------- Raccourcis ---------- */
.emp-shortcuts{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:10px}
.emp-shortcut{display:flex;align-items:center;gap:12px;padding:12px 14px;min-height:64px;border-radius:12px;border:1px solid var(--line);background:var(--surface);color:var(--ink);text-decoration:none;min-width:0}
.emp-shortcut:hover{background:var(--sunk)}
.emp-shortcut.main{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.emp-shortcut.main:hover{filter:brightness(1.08);background:var(--accent)}
.emp-shortcut.live{border-color:var(--ok);background:var(--ok-soft)}
.emp-sc-ico{width:38px;height:38px;border-radius:10px;display:grid;place-items:center;flex:none;background:var(--sunk);color:var(--accent)}
.emp-shortcut.main .emp-sc-ico{background:rgba(255,255,255,.16);color:inherit}
.emp-shortcut.live .emp-sc-ico{background:var(--surface);color:var(--ok)}
.emp-sc-ico svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.emp-sc-txt{display:flex;flex-direction:column;min-width:0;flex:1}
.emp-sc-txt b{font-family:var(--f-display);font-variation-settings:"wdth" 85;font-weight:700;font-size:16px;line-height:1.2}
.emp-sc-txt span{font-size:12.5px;opacity:.85}
.emp-shortcut:not(.main) .emp-sc-txt span{color:var(--muted);opacity:1}
.emp-sc-go{font-size:22px;line-height:1;opacity:.7;flex:none}

/* ---------- Onglets ---------- */
.emp-tabs{display:flex;gap:2px;border-bottom:1px solid var(--line);overflow-x:auto;scrollbar-width:none;margin-top:4px}
.emp-tabs::-webkit-scrollbar{display:none}
.emp-tab{border:0;background:none;padding:11px 14px;font-weight:600;color:var(--muted);border-bottom:2px solid transparent;cursor:pointer;white-space:nowrap;min-height:44px}
.emp-tab:hover{color:var(--ink)}
.emp-tab[aria-selected="true"]{color:var(--ink);border-bottom-color:var(--accent)}
.emp-panel{min-width:0}

/* ---------- Mes prochains quarts ---------- */
.emp-weeks{display:flex;flex-direction:column;gap:18px}
.emp-week{display:flex;flex-direction:column;gap:10px;min-width:0}
.emp-week-h{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:2px 12px;border-bottom:2px solid var(--line-strong);padding-bottom:6px}
.emp-week-h h3{font-family:var(--f-display);font-variation-settings:"wdth" 82;font-weight:800;font-size:19px;margin:0;line-height:1.15}
.emp-day{display:flex;flex-direction:column;gap:8px;min-width:0}
.emp-day-h{display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-family:var(--f-display);font-variation-settings:"wdth" 85;font-weight:700;font-size:15px;margin:2px 0 0}
.emp-day.today .emp-day-h{color:var(--accent)}
.emp-shift{display:flex;flex-direction:column;gap:8px;padding:12px 14px;border:1px solid var(--line);border-left:4px solid var(--c,var(--line-strong));border-radius:10px;background:var(--surface);min-width:0}
.emp-shift.disputed{border-color:var(--bad);border-left-color:var(--bad)}
.emp-shift-top{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 10px}
.emp-shift-meta{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px}
.emp-hint{margin:0;font-size:12.5px;color:var(--muted)}
.emp-past{border:1px solid var(--line);border-radius:12px;background:var(--surface);margin-top:18px}
.emp-past>summary{cursor:pointer;padding:12px 16px;font-weight:600;display:flex;align-items:center;gap:8px;list-style:none;min-height:44px}
.emp-past>summary::-webkit-details-marker{display:none}
.emp-past>summary::before{content:"›";font-size:18px;line-height:1;color:var(--muted);transition:transform .15s}
.emp-past[open]>summary::before{transform:rotate(90deg)}
.emp-past-list{display:flex;flex-direction:column;gap:12px;padding:0 16px 16px}
.emp-past .emp-shift{background:var(--bg)}

/* ---------- Horaire de l'équipe ---------- */
.emp-team .toolbar{margin-bottom:12px}
.emp-tdays{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,280px),1fr));gap:10px;align-items:start;transition:opacity .15s}
.emp-tdays.is-stale{opacity:.55}
.emp-tday{background:var(--surface);border:1px solid var(--line);border-radius:12px;min-width:0;overflow:hidden}
.emp-tday.today{border-color:var(--accent);box-shadow:inset 0 3px 0 var(--accent)}
.emp-tday-h{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:10px 12px;background:var(--sunk);border-bottom:1px solid var(--line)}
.emp-tday-h b{font-family:var(--f-display);font-variation-settings:"wdth" 82;font-weight:700;font-size:15px}
.emp-tday-h b .muted{font-weight:500}
.emp-tcount{margin-left:auto}
.emp-tlist{list-style:none;margin:0;padding:0}
.emp-trow{display:flex;flex-direction:column;gap:5px;padding:9px 12px;min-width:0}
.emp-trow+.emp-trow{border-top:1px solid var(--line)}
.emp-trow.mine{background:var(--accent-soft)}
.emp-trow-top{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;min-width:0}
.emp-tname{display:inline-flex;align-items:center;gap:7px;font-weight:600;min-width:0;overflow-wrap:anywhere}
.emp-tname .dot{width:10px;height:10px;border-radius:50%;background:var(--c);flex:none}
.emp-trow.open .emp-tname{color:var(--warn)}
.emp-ttime{margin-left:auto;font-size:12.5px;white-space:nowrap}
.emp-trow .emp-pos{font-size:12px;font-weight:500;color:var(--muted)}
.emp-track{position:relative;height:8px;border-radius:4px;background-color:var(--sunk);background-image:linear-gradient(to right,var(--line) 1px,transparent 1px);background-size:calc(100% / var(--nh,14)) 100%}
.emp-bar{position:absolute;top:0;bottom:0;border-radius:4px;background:var(--c,var(--accent));min-width:4px}
.emp-trow.open .emp-bar{background:repeating-linear-gradient(135deg,var(--warn) 0 4px,var(--warn-soft) 4px 7px)}
.emp-tempty{margin:0;padding:12px;color:var(--muted);font-size:13px}
.emp-team-note{margin:10px 0 0}

/* ---------- Disponibilités : formulaire ---------- */
.emp-col{display:flex;flex-direction:column;gap:14px;min-width:0}
.emp-form{display:flex;flex-direction:column;gap:14px}
.emp-form-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.emp-form-row.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.emp-seg{border:0;padding:0;margin:0;min-width:0}
.emp-seg legend{padding:0;margin-bottom:6px;font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.emp-seg-opts{display:flex;flex-wrap:wrap;gap:6px}
.emp-seg-opts label{display:inline-flex;align-items:center;gap:8px;padding:8px 14px;min-height:40px;border:1px solid var(--line-strong);border-radius:999px;background:var(--surface);font-weight:600;cursor:pointer}
.emp-seg-opts label:hover{background:var(--sunk)}
.emp-seg-opts label.on{background:var(--accent-soft);border-color:var(--accent);color:var(--accent)}
.emp-seg-opts input{width:16px;height:16px;margin:0;accent-color:var(--accent)}
.emp-seg-opts label:focus-within{outline:2px solid var(--accent);outline-offset:2px}

/* ---------- Disponibilités : avertissement et listes ---------- */
.emp-conflicts{align-items:flex-start}
.emp-conflicts-txt{flex:1;min-width:0}
.emp-conflicts-txt p{margin:0}
.emp-conflicts-txt p+p,.emp-conflicts-txt ul+p{margin-top:6px}
.emp-conflicts-txt ul{margin:6px 0 0;padding-left:18px}
.emp-conflicts .ibtn{background:transparent;border-color:transparent}
.emp-rules{list-style:none;margin:0;padding:0}
.emp-rule{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 12px;padding:10px 0}
.emp-rule+.emp-rule{border-top:1px solid var(--line)}
.emp-rule-txt{display:flex;flex-direction:column;gap:2px;flex:1 1 220px;min-width:0;overflow-wrap:anywhere}
.emp-rule-txt b{font-weight:600}
.emp-rule-txt .muted{font-size:13px}
.emp-rule.ended .emp-rule-txt b{color:var(--muted)}
.emp-rule-actions{flex:0 1 auto}
.emp-rule-actions .confirm{flex:1 1 100%}
.emp-ended{margin-top:10px;border-top:1px solid var(--line);padding-top:8px}
.emp-ended>summary{cursor:pointer;font-weight:600;color:var(--muted);padding:6px 0;min-height:36px}
.emp-occ{list-style:none;margin:0;padding:0}
.emp-occ-row{display:grid;grid-template-columns:minmax(0,190px) minmax(0,1fr);gap:4px 12px;padding:8px 0;align-items:baseline}
.emp-occ-row+.emp-occ-row{border-top:1px solid var(--line)}
.emp-occ-date{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.emp-occ-date b{font-weight:600}
.emp-occ-items{display:flex;flex-direction:column;gap:2px;min-width:0;overflow-wrap:anywhere}

@media (max-width:640px){
  .emp-form-row.three{grid-template-columns:repeat(2,minmax(0,1fr))}
  .emp-form-row.three>.field:first-child{grid-column:1/-1}
  .emp-occ-row{grid-template-columns:minmax(0,1fr)}
  .emp-ttime{margin-left:0}
}
@media (max-width:380px){
  .emp-form-row{grid-template-columns:minmax(0,1fr)}
  .emp-form-row.three{grid-template-columns:minmax(0,1fr)}
}
