/* Cockpit Floc'It — orange de marque : Pantone Orange 016 C ≈ #FF5600 */
:root {
  --orange: #ff5600;
  --orange-soft: #fff0e8;
  --ink: #1c1917;
  --ink-2: #57534e;
  --line: #e7e5e4;
  --ground: #faf8f6;
  --card: #ffffff;
  --ok: #15803d;
  --ok-soft: #ecfdf3;
  --pause: #a16207;
  --pause-soft: #fef6e0;
  --alert: #b42318;
  --alert-soft: #fef0ef;
  --radius: 10px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--ground); line-height: 1.5; font-size: 16px; }
a { color: var(--ink); text-decoration-color: var(--orange); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { color: #000; }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
code { background: var(--ground); border: 1px solid var(--line); padding: .1rem .35rem; border-radius: 4px; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.strong { font-weight: 650; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* En-tête */
.top { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; padding: .75rem 1.25rem; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 750; text-decoration: none; font-size: 1.1rem; }
.brand-sub { font-weight: 450; color: var(--ink-2); }
.brand-mark { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 8px; background: var(--orange); color: var(--ink); font-weight: 800; }
.top nav { display: flex; flex-wrap: wrap; gap: .25rem; flex: 1; }
.top nav a { padding: .45rem .75rem; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-weight: 550; }
.top nav a:hover { background: var(--ground); color: var(--ink); }
.top nav a[aria-current="page"] { background: var(--orange-soft); color: var(--ink); box-shadow: inset 0 -2px 0 var(--orange); }
.logout { display: flex; align-items: center; gap: .75rem; margin: 0; }
.who { color: var(--ink-2); font-size: .875rem; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
.head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem 1rem; margin-bottom: 1rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; }
.card.narrow { max-width: 560px; }
.card.empty { text-align: center; padding: 2.5rem 1rem; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 1rem; }

/* Boutons et formulaires */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .55rem 1rem; border-radius: 8px; border: 2px solid var(--orange); background: var(--orange); color: var(--ink); font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; }
.btn:hover { background: #e84e00; border-color: #e84e00; color: var(--ink); }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-ghost:hover { background: var(--ground); border-color: var(--ink-2); }
.btn-link { background: none; border: none; padding: .25rem; font: inherit; color: var(--ink); text-decoration: underline; text-decoration-color: var(--orange); cursor: pointer; min-height: 44px; }
.form { display: grid; gap: .9rem; }
.form-inline { display: flex; flex-wrap: wrap; align-items: end; gap: .5rem; margin: .5rem 0; }
.row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: .9rem; }
label { display: grid; gap: .3rem; font-weight: 550; font-size: .95rem; }
label.check { display: flex; align-items: center; gap: .5rem; font-weight: 450; }
input, select { font: inherit; min-height: 44px; padding: .5rem .65rem; border: 1px solid #c9c5c1; border-radius: 8px; background: #fff; color: var(--ink); width: 100%; }
input[type="checkbox"] { width: 22px; min-height: 22px; accent-color: var(--orange); }
input[type="file"] { padding: .4rem; }

.flash { padding: .7rem 1rem; border-radius: 8px; font-weight: 550; }
.flash-ok { background: var(--ok-soft); color: var(--ok); }
.flash-err { background: var(--alert-soft); color: var(--alert); }
.alert-pill { white-space: nowrap; display: inline-block; padding: .15rem .55rem; border-radius: 999px; background: var(--alert-soft); color: var(--alert); font-weight: 650; font-size: .85rem; }

/* Tableaux */
.table-box { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1rem; }
.card .table-box { border: none; margin: 0 -1.25rem; border-radius: 0; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .65rem 1rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); font-weight: 650; background: var(--ground); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: none; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.right { text-align: right; }
tr.inactive td { color: var(--ink-2); }
tr.row-alert td:first-child { box-shadow: inset 3px 0 0 var(--alert); }
.cell-person { white-space: nowrap; }
.cell-person .avatar { vertical-align: middle; margin-right: .5rem; }

/* Avatars */
.avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--orange-soft); }
.avatar-initials { display: inline-grid; place-items: center; font-weight: 750; color: var(--ink); background: var(--orange-soft); border: 2px solid var(--orange); }
.avatar-sm { width: 32px; height: 32px; font-size: .75rem; }
.avatar-md { width: 48px; height: 48px; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.3rem; }
.avatar-xl { width: 120px; height: 120px; font-size: 2.2rem; }
.photo-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-bottom: 1.25rem; }

/* Présence */
.presence-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: .75rem; }
.person { display: flex; gap: .9rem; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.person p { margin: 0; }
.person-name { font-weight: 700; }
.badge-state { display: inline-block; margin: .2rem 0 !important; padding: .1rem .55rem; border-radius: 999px; font-size: .85rem; font-weight: 650; background: var(--ground); color: var(--ink-2); }
.state-present .badge-state { background: var(--ok-soft); color: var(--ok); }
.state-pause .badge-state { background: var(--pause-soft); color: var(--pause); }
.state-present { border-left: 4px solid var(--ok); }
.state-pause { border-left: 4px solid #d4a017; }

/* Indicateurs */
.kpis { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .75rem; }
@media (max-width: 760px) {
  .top { padding: .6rem 1rem; }
  .top nav { order: 3; flex-basis: 100%; flex-wrap: nowrap; overflow-x: auto; }
  .top nav a { white-space: nowrap; }
  .logout { margin-left: auto; }
  .who { display: none; }
  .kpi-value { font-size: 1.3rem; }
}
.kpis li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; display: grid; }
.kpi-value { font-size: 1.6rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.kpi-label { color: var(--ink-2); font-size: .9rem; }
.kpi-alert { border-color: var(--alert) !important; background: var(--alert-soft) !important; }
.kpi-alert .kpi-value { color: var(--alert); }

/* Liste des pointages */
.punch-list { list-style: none; padding: 0; margin: 0; }
.punch-list li { display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: baseline; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.punch-list li:last-child { border-bottom: none; }
.punch-when { font-variant-numeric: tabular-nums; min-width: 8.5rem; }
.punch-type { font-weight: 650; }
.punch-list li.voided .punch-when, .punch-list li.voided .punch-type { text-decoration: line-through; color: var(--ink-2); }
details.void { width: 100%; }
details.void summary { cursor: pointer; color: var(--ink-2); font-size: .875rem; }

/* Planning */
.flash-warn { background: var(--pause-soft); color: #713f12; }
.flash-warn ul { margin: 0; padding-left: 1.1rem; }
.count-pill { display: inline-grid; place-items: center; min-width: 1.4rem; height: 1.4rem; margin-left: .4rem; padding: 0 .35rem; border-radius: 999px; background: var(--alert); color: #fff; font-size: .8rem; }
.planning table { table-layout: fixed; min-width: 980px; }
.planning th:first-child { width: 140px; }
.planning th, .planning td { white-space: normal; vertical-align: top; }
.planning tbody th { background: var(--card); text-transform: none; letter-spacing: 0; font-size: .95rem; color: var(--ink); }
.planning .is-today { background: var(--orange-soft); }
td.slot { padding: .45rem; min-height: 4rem; }
.assign { position: relative; display: grid; padding: .35rem 1.6rem .35rem .5rem; margin-bottom: .35rem; border-radius: 6px; background: #f5f5f4; border-left: 4px solid var(--ink-2); font-size: .85rem; line-height: 1.3; }
.assign-brodeuse { border-left-color: var(--orange); background: #fff4ed; }
.assign-presse { border-left-color: #2563eb; background: #eff4ff; }
.assign-decoupe { border-left-color: #7c3aed; background: #f5f0ff; }
.assign-time { font-variant-numeric: tabular-nums; font-weight: 650; }
.assign-note { color: var(--ink-2); font-size: .8rem; }
.assign-del { position: absolute; top: .1rem; right: .1rem; margin: 0; }
.btn-x { width: 28px; height: 28px; border: none; background: transparent; font-size: 1.1rem; line-height: 1; color: var(--ink-2); cursor: pointer; border-radius: 6px; }
.btn-x:hover { background: rgba(0,0,0,.07); color: var(--alert); }
.chip { display: inline-block; margin: 0 .25rem .3rem 0; padding: .1rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 650; }
.chip-dispo { background: var(--ok-soft); color: var(--ok); }
.chip-indispo { background: var(--pause-soft); color: #854d0e; }
.chip-leave { background: #1c1917; color: #fff; }
.chip-leave-pending { background: #e7e5e4; color: var(--ink); }
fieldset.days { border: 1px solid var(--line); border-radius: 8px; padding: .5rem .75rem .75rem; display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
fieldset.days legend { font-weight: 550; padding: 0 .25rem; }
.status { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .85rem; font-weight: 650; }
.status-en_attente { background: var(--pause-soft); color: #854d0e; }
.status-accepte { background: var(--ok-soft); color: var(--ok); }
.status-refuse { background: #e7e5e4; color: var(--ink-2); }
.wrap-cell { white-space: normal; max-width: 280px; }
.input-sm { width: 5.5rem; }
.copy-field { font-size: .85rem; background: var(--ground); }
.center { text-align: center; }
form.inline { display: inline; }
/* Vue par poste : frise 7 h – 19 h */
.timeline { min-width: 860px; padding: .5rem 1rem 1rem; }
.tl-row { display: grid; grid-template-columns: 220px 1fr; align-items: center; gap: 1rem; min-height: 3rem; border-bottom: 1px solid var(--line); }
.tl-row:last-child { border-bottom: none; }
.tl-label { display: grid; line-height: 1.25; }
.tl-track { position: relative; height: 2.2rem; background: repeating-linear-gradient(90deg, transparent 0 calc(100% / 12 - 1px), var(--line) calc(100% / 12 - 1px) calc(100% / 12)); }
.tl-scale .tl-track { background: none; height: 1.5rem; }
.tl-tick { position: absolute; left: var(--x); transform: translateX(-50%); font-size: .78rem; color: var(--ink-2); }
.tl-bar { position: absolute; left: var(--x); width: var(--w); top: .2rem; bottom: .2rem; display: flex; align-items: center; padding: 0 .5rem; border-radius: 6px; background: var(--orange); color: var(--ink); font-size: .82rem; font-weight: 650; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* Page personnelle de l'employé (téléphone) */
.me { max-width: 560px; margin: 0 auto; padding: 1rem 1rem 3rem; }
.me-head { display: flex; justify-content: space-between; align-items: center; padding: .5rem 0 1rem; font-weight: 650; }
.me-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.me-list li { padding: .5rem 0; border-bottom: 1px solid var(--line); }
.kiosk-plan { background: #292524; border-radius: 12px; padding: 1rem 1.5rem; font-size: 1.4rem; }
.kiosk-plan p { margin: 0 0 .4rem; color: #fcd9c4; font-size: 1.1rem; }
.kiosk-plan ul { margin: 0; padding: 0; list-style: none; font-weight: 700; }

/* Affaires */
.block { display: block; }
.ref { font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 600; margin-right: .35rem; }
.deal-link { font-weight: 650; text-decoration: none; }
.deal-link:hover { text-decoration: underline; text-decoration-color: var(--orange); }
table.deals { min-width: 760px; }
table.deals td { white-space: normal; vertical-align: top; }
.tabs { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 2px solid var(--line); margin: .5rem 0 1rem; }
.tabs a { padding: .6rem 1rem; text-decoration: none; color: var(--ink-2); font-weight: 600; margin-bottom: -2px; border-bottom: 2px solid transparent; }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--orange); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.filters .grow { flex: 1 1 280px; }
.stage { display: inline-block; padding: .12rem .55rem; border-radius: 999px; font-size: .82rem; font-weight: 650; background: #f5f5f4; color: var(--ink); white-space: nowrap; }
.stage-nouvelle, .stage-devis_a_faire { background: var(--orange-soft); color: #9a3412; }
.stage-devis_envoye, .stage-accepte { background: #eff4ff; color: #1d4ed8; }
.stage-bat_en_cours, .stage-bat_valide { background: #f5f0ff; color: #6d28d9; }
.stage-en_production, .stage-pret { background: var(--pause-soft); color: #854d0e; }
.stage-livre, .stage-paye { background: var(--ok-soft); color: var(--ok); }
.stage-perdu { background: #e7e5e4; color: var(--ink-2); }
.stage-lg { font-size: 1rem; padding: .35rem .9rem; }
.alert-pill.level-info { background: var(--orange-soft); color: #9a3412; }
.alert-pill.level-attention { background: var(--pause-soft); color: #854d0e; }
.alert-pill { margin: 0 .25rem .25rem 0; }
.pipeline { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: .75rem; overflow-x: auto; padding-bottom: .75rem; margin-bottom: 1rem; }
.pipe-col { background: #f1efed; border-radius: var(--radius); padding: .75rem; min-height: 12rem; }
.pipe-head { font-size: .95rem; margin: 0; display: flex; justify-content: space-between; }
.pipe-total { margin: .15rem 0 .6rem; }
.pipe-card { display: grid; gap: .2rem; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: .6rem .7rem; margin-bottom: .5rem; text-decoration: none; font-size: .9rem; }
.pipe-card:hover { border-color: var(--orange); }
.deal-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 900px) { .deal-grid { grid-template-columns: minmax(0, 1fr); } }
.reply-card { border: 2px solid var(--orange); }
.reply textarea { width: 100%; font: inherit; padding: .75rem; border: 1px solid #c9c5c1; border-radius: 8px; resize: vertical; line-height: 1.5; margin: .5rem 0; }
.reply summary { cursor: pointer; font-weight: 650; padding: .3rem 0; }
.reply + .reply { margin-top: .5rem; border-top: 1px solid var(--line); padding-top: .5rem; }
textarea { font: inherit; padding: .6rem; border: 1px solid #c9c5c1; border-radius: 8px; width: 100%; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .75rem 1rem; margin: 1rem 0; }
.facts dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); font-weight: 650; }
.facts dd { margin: .15rem 0 0; font-weight: 600; }
h3 { font-size: 1rem; margin: 1rem 0 .4rem; }
.missing { margin: 0; padding-left: 1.2rem; }
.missing li { margin: .2rem 0; }
.thread { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.msg { border-radius: 10px; padding: .75rem 1rem; background: var(--ground); border: 1px solid var(--line); }
.msg-out { background: var(--orange-soft); border-color: #fed7c2; margin-left: 2rem; }
.msg-in { margin-right: 2rem; }
.msg-head { margin: 0 0 .25rem; display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: baseline; }
.msg-subject { margin: 0 0 .35rem; font-weight: 600; }
.msg-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.add-msg { margin-top: 1rem; }
.add-msg summary { cursor: pointer; font-weight: 600; }
.events { list-style: none; padding: 0; margin: .75rem 0 0; }
.events li { padding: .45rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.suggest-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.suggest-row form { margin: 0; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Prix (agent Pricing) */
.price-card { border: 2px solid var(--line); }
.price-card.is-below { border-color: var(--alert); box-shadow: 0 0 0 4px var(--alert-soft); }
.price-big { font-size: 1.8rem; font-weight: 800; margin: .25rem 0; font-variant-numeric: tabular-nums; }
.price-card .table-box { margin-top: .75rem; }
.price-card td { white-space: normal; vertical-align: top; }
.alert-list li { color: var(--alert); font-weight: 600; }
.sent-form { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.calc-edit { margin-top: 1rem; }
.calc-edit > summary { cursor: pointer; font-weight: 650; }
.calc-edit form { margin-top: .75rem; }
.row3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: .75rem; }
fieldset.calc-line { border: 1px solid var(--line); border-radius: 8px; padding: .75rem; display: grid; gap: .6rem; }
fieldset.calc-line legend { font-weight: 650; padding: 0 .3rem; }
.zone-row { display: grid; grid-template-columns: minmax(140px, 1.3fr) minmax(110px, 1fr) minmax(90px, .8fr) minmax(130px, 1fr); gap: .5rem; align-items: end; }
@media (max-width: 640px) { .zone-row { grid-template-columns: 1fr 1fr; } }
.zone-num { font-size: .85rem; }
.pair { display: flex; gap: .3rem; }
.score { font-weight: 700; }
.score-chaud { color: var(--alert); }
.score-tiede { color: #a16207; }
.score-froid { color: var(--ink-2); }
/* Tarifs */
.tarif-fields { display: grid; gap: 1rem; }
fieldset.tarif { border: 1px solid var(--line); border-radius: 8px; padding: .5rem .9rem .9rem; }
fieldset.tarif legend { font-weight: 650; padding: 0 .3rem; }
.tier-grid { display: grid; grid-template-columns: auto auto; justify-content: start; gap: .4rem 1.25rem; align-items: center; }
.tier-grid label { display: flex; align-items: center; gap: .4rem; font-weight: 450; }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .5rem 1rem; }
.kv-grid label span, .tarif-one span { display: flex; align-items: center; gap: .4rem; font-weight: 450; }
.tarif-one { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.sticky-actions { position: sticky; bottom: 0; background: var(--ground); padding: .75rem 0; align-items: center; border-top: 1px solid var(--line); }

/* Badges imprimables (format carte bancaire) */
.print-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; padding: 1rem; background: var(--card); border-bottom: 1px solid var(--line); }
.sheet { display: flex; flex-wrap: wrap; gap: 8mm; padding: 10mm; }
.badge-card { width: 85.6mm; height: 54mm; border-radius: 3.2mm; background: #fff; border: .3mm solid #d6d3d1; overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; padding: 3mm 3.5mm 2.5mm; break-inside: avoid; }
.badge-top { display: flex; justify-content: space-between; align-items: center; background: var(--orange); margin: -3mm -3.5mm 2mm; padding: 2mm 3.5mm; }
.badge-logo { font-weight: 800; font-size: 11pt; color: var(--ink); }
.badge-role { font-size: 7.5pt; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--ink); }
.badge-body { display: flex; align-items: center; gap: 3mm; }
.avatar-badge { width: 20mm; height: 20mm; border-radius: 2mm; font-size: 16pt; }
.badge-name { margin: 0; font-size: 14pt; font-weight: 800; line-height: 1.1; }
.badge-name span { font-weight: 500; font-size: 10pt; }
.badge-code { width: 100%; height: 11mm; object-fit: contain; }
.action-card { grid-template-rows: auto 1fr auto; text-align: center; border: .6mm solid var(--orange); }
.action-label { margin: 2mm 0 0; font-size: 18pt; font-weight: 800; }
.action-card .badge-code { height: 16mm; align-self: center; }
.action-card p { margin: 0; }
@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  .sheet { padding: 0; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Borne de pointage (PC de l'atelier, lisible de loin) */
body.bare { background: var(--ground); }
.kiosk { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto auto; background: var(--ink); color: #fff; }
.kiosk .brand { color: #fff; font-size: 1.5rem; }
.kiosk-head { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem 2rem; }
.kiosk-clock { margin: 0; font-size: 2.2rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.kiosk-main { display: grid; place-items: center; align-content: center; gap: 1.25rem; padding: 2rem; text-align: center; }
.kiosk-hint { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; margin: 0; }
.kiosk-hint::after { content: ""; display: block; width: 4rem; height: .4rem; background: var(--orange); border-radius: 4px; margin: 1rem auto 0; }
.kiosk-sub { font-size: 1.6rem; margin: 0; color: #fcd9c4; min-height: 2rem; }
.kiosk-person { display: grid; justify-items: center; gap: 1rem; }
.kiosk-person img, .kiosk-person .kiosk-initials { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; border: 6px solid var(--orange); }
.kiosk-initials { display: grid; place-items: center; background: #292524; font-size: 3.5rem; font-weight: 800; }
.kiosk-name { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; margin: 0; }
.kiosk-done { font-size: 2rem; margin: 0; padding: .6rem 1.4rem; border-radius: 12px; background: var(--ok); }
.kiosk-error { font-size: 1.8rem; margin: 0; padding: .8rem 1.4rem; border-radius: 12px; background: var(--alert); max-width: 900px; }
.kiosk-choices { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.25rem; }
.kiosk-choices button { min-width: 280px; min-height: 120px; font: inherit; font-size: 2rem; font-weight: 800; border-radius: 16px; border: 4px solid var(--orange); background: transparent; color: #fff; cursor: pointer; }
.kiosk-choices button:first-child { background: var(--orange); color: var(--ink); }
.kiosk-choices button kbd { display: block; font: inherit; font-size: 1rem; font-weight: 600; opacity: .8; }
.kiosk-input { position: absolute; left: -9999px; }
.kiosk-presence { list-style: none; margin: 0; padding: 1rem 2rem 1.5rem; display: flex; flex-wrap: wrap; gap: .75rem; border-top: 1px solid #44403c; }
.kiosk-presence li { display: flex; align-items: center; gap: .5rem; padding: .4rem .9rem .4rem .4rem; border-radius: 999px; background: #292524; font-size: 1.1rem; font-weight: 600; }
.kiosk-presence .dot { width: .9rem; height: .9rem; border-radius: 50%; background: #78716c; margin-left: .4rem; }
.kiosk-presence .present .dot { background: #4ade80; }
.kiosk-presence .pause .dot { background: #facc15; }
.kiosk-presence .absent { opacity: .55; }

/* Tableau de production */
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { padding: .2rem 0; }
.check-row { display: flex; gap: .5rem; align-items: center; }
.check-row input { width: 1.2rem; height: 1.2rem; }
.btn-sm { min-height: 36px; padding: .3rem .7rem; font-size: .9rem; }
.count { display: inline-grid; place-items: center; min-width: 1.5rem; height: 1.5rem; padding: 0 .4rem; margin-left: .35rem; border-radius: 999px; background: var(--ground); border: 1px solid var(--line); font-size: .8rem; color: var(--ink-2); }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: .75rem; overflow-x: auto; padding-bottom: .75rem; align-items: start; }
.board-col { background: #f3f1ee; border-radius: var(--radius); padding: .75rem; min-height: 8rem; }
.board-col h2 { font-size: 1rem; display: flex; align-items: center; margin-bottom: .5rem; }
.col-a_venir { background: #f7f6f4; }
.col-a_venir .pcard { opacity: .8; }
.col-pret { background: var(--ok-soft); }
.poste-h { font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); margin: .75rem 0 .35rem; }
.pcards { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.pcard { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--orange); border-radius: 8px; padding: .6rem .7rem; }
.pcard p { margin: 0 0 .25rem; }
.pcard-late { border-left-color: var(--alert); }
.pcard-head a { font-weight: 700; text-decoration: none; }
.pcard-title { font-size: .92rem; }
.pcard-actions { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-top: .35rem; }
.move-form { display: flex; gap: .35rem; flex: 1; min-width: 0; }
.move-form select { flex: 1; min-width: 0; min-height: 36px; font-size: .85rem; }
.col-note { margin-top: .5rem; }
.chip-a_commander { background: var(--pause-soft); color: #854d0e; }
.chip-commandes { background: #eff4ff; color: #1d4ed8; }
.chip-recus { background: var(--ok-soft); color: var(--ok); }
.bat-thumb { max-width: 100%; max-height: 260px; border: 1px solid var(--line); border-radius: 6px; display: block; margin-bottom: .5rem; }

/* Poste d'emballage : lisible et visable de loin */
.scan-card { display: grid; gap: .75rem; max-width: 640px; }
.scan-label { font-size: 1.2rem; font-weight: 700; }
.scan-input { font-size: 1.6rem; padding: .7rem 1rem; border: 3px solid var(--orange); border-radius: 10px; letter-spacing: .04em; }
.pack-lines li { padding: .4rem 0; border-bottom: 1px solid var(--line); }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: .75rem 1rem; margin: 0; display: grid; gap: .6rem; }
legend { font-weight: 650; padding: 0 .3rem; }

/* Document de production (A4) */
.prod-doc { max-width: 190mm; margin: 0 auto; padding: 10mm; background: #fff; }
.prod-doc-head { display: flex; justify-content: space-between; gap: 6mm; align-items: flex-start; border-bottom: 1.2mm solid var(--orange); padding-bottom: 4mm; margin-bottom: 4mm; }
.prod-doc-head h1 { font-size: 18pt; margin: 0; }
.prod-doc-head p { margin: 1mm 0 0; }
.prod-doc-brand { font-weight: 800; font-size: 10pt; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); }
.prod-doc-code { text-align: center; flex: none; }
.prod-doc-code img { display: block; width: 70mm; height: 18mm; object-fit: contain; }
.prod-doc-code span { font-family: ui-monospace, monospace; font-size: 10pt; letter-spacing: .1em; }
.prod-facts { margin: 0 0 4mm; }
.prod-address { margin: 0 0 4mm; }
.prod-table { width: 100%; border-collapse: collapse; font-size: 10.5pt; margin-bottom: 4mm; }
.prod-table th, .prod-table td { border: .3mm solid #a8a29e; padding: 2mm; text-align: left; vertical-align: top; }
.prod-table th { background: #f5f5f4; font-size: 9pt; text-transform: uppercase; letter-spacing: .03em; }
.prod-table .num { text-align: right; font-weight: 700; font-size: 12pt; }
.prod-table .check { width: 14mm; text-align: center; }
.box { display: inline-block; width: 6mm; height: 6mm; border: .5mm solid var(--ink); border-radius: 1mm; }
.prod-bat { border: .3mm dashed #a8a29e; border-radius: 2mm; padding: 3mm; text-align: center; margin-bottom: 4mm; }
.prod-bat img { max-width: 100%; max-height: 120mm; object-fit: contain; }
.bat-missing { font-weight: 700; color: var(--alert); margin: 6mm 0; }
.prod-doc-foot { display: flex; justify-content: space-between; gap: 4mm; color: var(--ink-2); border-top: .3mm solid var(--line); padding-top: 2mm; }
@media print {
  .prod-doc { padding: 0; max-width: none; }
  @page { size: A4; margin: 10mm; }
}
.move-form { flex-basis: 100%; }
.prod-table thead .num { font-size: 9pt; }
.prod-table tr:last-child td { border-bottom: .3mm solid #a8a29e; }
.top nav { min-width: 0; }
.top nav a { white-space: nowrap; }
@media (max-width: 700px) {
  .top nav { order: 3; flex-basis: 100%; flex-wrap: nowrap; overflow-x: auto; }
}
.board, .pcard { position: relative; }
/* Le tableau prend toute la largeur de l'écran (TV de l'atelier, PC du responsable). */
.board { margin-left: calc(50% - 50vw + 1rem); margin-right: calc(50% - 50vw + 1rem); grid-auto-columns: minmax(210px, 1fr); }

/* Pilotage */
.hero-card { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; }
.ring { width: 180px; height: 180px; flex: none; }
.ring-track { fill: none; stroke: var(--line); stroke-width: 12; }
.ring-value { fill: none; stroke: var(--orange); stroke-width: 12; stroke-linecap: round; }
.ring-label { text-anchor: middle; font-size: 26px; font-weight: 800; fill: var(--ink); }
.ring-sub { text-anchor: middle; font-size: 11px; fill: var(--ink-2); }
.hero-text { flex: 1; min-width: 220px; }
.hero-text p { margin: 0 0 .35rem; }
.hero-label { text-transform: uppercase; letter-spacing: .04em; font-size: .8rem; font-weight: 650; color: var(--ink-2); }
.hero-number { font-size: 2.6rem; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.reward { margin-top: .6rem !important; padding: .5rem .75rem; background: var(--orange-soft); border-radius: 8px; display: inline-block; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 1rem; margin-bottom: 1rem; }
.tiles .card { margin: 0; }
.tile-label { margin: 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 650; color: var(--ink-2); }
.tile-number { margin: .2rem 0 .3rem; font-size: 1.9rem; font-weight: 800; line-height: 1.15; }
.tile-number span { font-size: 1rem; font-weight: 600; color: var(--ink-2); }
.tile p.small { margin: 0; }
.gauge { position: relative; height: 10px; background: var(--line); border-radius: 999px; margin: .3rem 0 .5rem; }
.gauge-fill { position: absolute; inset: 0 auto 0 0; background: var(--orange); border-radius: 999px; }
.gauge-target { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); }
.bar-cell { width: 35%; min-width: 80px; }
.hbar { display: block; height: 10px; border-radius: 0 4px 4px 0; background: #ffc8ab; min-width: 2px; }
.hbar-signe { background: var(--orange); }
.table-box { position: relative; }
