/* ============================================================
   COUVOIR DU COIN — Assistant Abattage
   screens.css — Styles par écran
   © Couvoir du Coin — couvoirducoin.ca
   ============================================================ */

/* ══════════════════════════════════════════
   ACCUEIL
══════════════════════════════════════════ */
#screen-home {
  flex-direction: column; align-items: center; justify-content: flex-start;
  padding: 1.2rem 1.2rem 5rem; gap: 0.9rem;
  overflow-y: auto; min-height: 100vh;
}
.home-logo-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 0.5rem; }
.home-logo { width: 88px; height: 88px; object-fit: contain; border-radius: 18px; }
.home-brand { font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem; font-weight: 600; color: var(--text-muted); letter-spacing: 0.12em; text-transform: uppercase; }
.home-title { font-family: 'IBM Plex Mono', monospace; font-size: 1.25rem; font-weight: 600; color: var(--green); text-align: center; }
.home-sub   { font-size: 0.84rem; color: var(--text-dim); line-height: 1.6; max-width: 290px; text-align: center; }

.animal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; max-width: 320px; }
.animal-card {
  background: var(--bg3); border: 2px solid var(--border);
  border-radius: var(--radius-md); padding: 12px 8px;
  text-align: center; cursor: pointer; transition: all 0.15s;
}
.animal-card:active { transform: scale(0.97); }
.animal-card.selected { border-color: var(--green); background: var(--green-pale); }
.animal-card .a-icon { font-size: 1.8rem; display: block; margin-bottom: 4px; }
.animal-card .a-name { font-size: 0.8rem; font-weight: 600; color: var(--text-dim); }
.animal-card.selected .a-name { color: var(--green); }
.animal-card .a-sub  { font-size: 0.68rem; color: var(--text-muted); margin-top: 2px; }

.home-card {
  width: 100%; max-width: 320px;
  background: var(--bg3); border: 1px solid var(--border-bright);
  border-radius: 14px; padding: 1rem 1.1rem;
  display: flex; flex-direction: column; gap: 10px;
}
.home-row { display: flex; align-items: center; justify-content: space-between; font-size: 0.86rem; color: var(--text-dim); }
.home-row-sep { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 2px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; font-size: 0.84rem; color: var(--text-dim); }
.bird-count { display: flex; align-items: center; gap: 10px; }
.count-btn {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--border-bright); background: var(--bg2); color: var(--green);
  font-size: 1.1rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.count-btn:active { background: var(--green-pale); }
.count-val { font-family: 'IBM Plex Mono', monospace; font-size: 1.2rem; font-weight: 600; color: var(--text); min-width: 30px; text-align: center; }

.btn-start {
  width: 100%; max-width: 320px; padding: 1.1rem;
  background: var(--green); color: #0a1a0c;
  border: none; border-radius: 14px;
  font-family: 'IBM Plex Sans', sans-serif; font-size: 1rem; font-weight: 600;
  cursor: pointer; transition: opacity 0.15s;
}
.btn-start:active { opacity: 0.85; }

/* ══════════════════════════════════════════
   INSPECTION SANTÉ
══════════════════════════════════════════ */
#screen-health {
  flex-direction: column;
  max-width: 600px; margin: 0 auto;
}
.health-body { flex: 1; overflow-y: auto; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.8rem; }
.health-intro {
  background: var(--amber-pale); border: 1px solid var(--amber-dim);
  border-radius: var(--radius-md); padding: 12px 14px;
  font-size: 0.85rem; color: #d4a017; line-height: 1.65;
}
.health-intro strong { color: var(--amber); }
.health-check-card {
  background: var(--bg3); border: 1px solid var(--border-bright);
  border-radius: var(--radius-md); overflow: hidden;
}
.health-check-card.danger-card { border-color: var(--red-dim); }
.health-check-header {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px; cursor: pointer;
}
.health-check-icon { font-size: 1.2rem; flex-shrink: 0; }
.health-check-title { font-size: 0.88rem; font-weight: 600; color: var(--text); flex: 1; }
.health-check-title span { display: block; font-size: 0.74rem; font-weight: 400; color: var(--text-muted); margin-top: 1px; }
.health-check-body { display: none; padding: 0 13px 12px 43px; font-size: 0.83rem; color: var(--text-dim); line-height: 1.7; }
.health-check-body.open { display: block; }
.sign-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 8px; }
.sign-ok  { background: var(--green-pale); border-radius: 7px; padding: 8px 10px; font-size: 0.78rem; color: #7aad8a; }
.sign-nok { background: var(--red-pale);   border-radius: 7px; padding: 8px 10px; font-size: 0.78rem; color: #f87171; }
.sign-ok .st, .sign-nok .st { font-weight: 700; font-size: 0.7rem; letter-spacing: 0.04em; margin-bottom: 3px; }
.sign-ok .st  { color: var(--green); }
.sign-nok .st { color: var(--red); }
.sign-ok li, .sign-nok li { margin-left: 10px; margin-top: 2px; }
.health-footer {
  padding: 0.85rem 1.1rem 1rem; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 8px; background: var(--bg); flex-shrink: 0;
}
.health-verdict { font-size: 0.8rem; text-align: center; min-height: 18px; color: var(--text-muted); }
.btn-health-ok  {
  width: 100%; padding: 1rem; background: var(--green); color: #0a1a0c;
  border: none; border-radius: 12px; font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.97rem; font-weight: 600; cursor: pointer;
}
.btn-health-stop {
  width: 100%; padding: 0.75rem; background: var(--red-pale); color: var(--red);
  border: 1px solid var(--red-dim); border-radius: 12px;
  font-family: 'IBM Plex Sans', sans-serif; font-size: 0.88rem; font-weight: 600; cursor: pointer;
}

/* ══════════════════════════════════════════
   ÉQUIPEMENT
══════════════════════════════════════════ */
#screen-equip { flex-direction: column; max-width: 600px; margin: 0 auto; }
.equip-header {
  padding: 0.9rem 1.1rem 0.65rem; border-bottom: 1px solid var(--border);
  flex-shrink: 0; display: flex; align-items: center; justify-content: space-between;
}
.equip-header-title { font-family: 'IBM Plex Mono', monospace; font-size: 0.95rem; font-weight: 600; color: var(--text); }
.equip-header-sub { font-size: 0.71rem; color: var(--text-muted); }
.equip-animal-pill {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 20px;
  border: 1px solid var(--border-bright); background: var(--bg3);
  font-size: 0.79rem; color: var(--text-dim); white-space: nowrap;
}
.equip-progress-wrap { padding: 0.55rem 1.1rem 0; flex-shrink: 0; }
.equip-prog-row { display: flex; justify-content: space-between; margin-bottom: 5px; }
.equip-prog-label { font-size: 0.73rem; color: var(--text-muted); }
.equip-prog-val { font-family: 'IBM Plex Mono', monospace; font-size: 0.73rem; color: var(--green); }
.equip-body { flex: 1; overflow-y: auto; padding: 0.9rem 1rem; }
.equip-cat { margin-bottom: 1.1rem; }
.equip-cat-title { font-size: 0.67rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.09em; color: var(--text-muted); margin-bottom: 7px; padding-left: 2px; }
.equip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.equip-item {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 10px;
  display: flex; align-items: flex-start; gap: 8px;
  cursor: pointer; transition: all 0.15s; position: relative;
}
.equip-item:active { transform: scale(0.97); }
.equip-item.checked { border-color: var(--green-dim); background: var(--green-pale); }
.equip-item-cb {
  width: 19px; height: 19px; border-radius: 5px;
  border: 1.5px solid var(--border-bright); background: var(--bg2);
  flex-shrink: 0; margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.equip-item.checked .equip-item-cb { background: var(--green); border-color: var(--green); }
.equip-item.checked .equip-item-cb::after { content: '✓'; color: #0a1a0c; font-size: 11px; font-weight: 700; }
.equip-item-icon  { font-size: 1rem; display: block; margin-bottom: 2px; }
.equip-item-name  { font-size: 0.79rem; font-weight: 600; color: var(--text); line-height: 1.2; }
.equip-item.checked .equip-item-name { color: var(--text-muted); text-decoration: line-through; }
.equip-item-note  { font-size: 0.68rem; color: var(--text-muted); margin-top: 2px; line-height: 1.3; }
.equip-req-badge  { position: absolute; top: 6px; right: 7px; font-size: 0.57rem; font-weight: 700; color: var(--red); letter-spacing: 0.04em; text-transform: uppercase; }
.equip-footer {
  padding: 0.85rem 1rem 1rem; border-top: 1px solid var(--border);
  flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; background: var(--bg);
}
.equip-missing  { font-size: 0.77rem; color: var(--amber); text-align: center; min-height: 18px; }
.btn-equip-go   {
  width: 100%; padding: 1rem; background: var(--green); color: #0a1a0c;
  border: none; border-radius: 12px; font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.97rem; font-weight: 600; cursor: pointer;
}
.btn-equip-go:active { opacity: 0.85; }
.btn-text-back { background: none; border: none; color: var(--text-muted); font-family: 'IBM Plex Sans', sans-serif; font-size: 0.83rem; cursor: pointer; padding: 0.4rem; width: 100%; }

/* ══════════════════════════════════════════
   GUIDE PRINCIPAL
══════════════════════════════════════════ */
#screen-guide { flex-direction: column; max-width: 600px; margin: 0 auto; }
.top-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.7rem 1.1rem 0.55rem;
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.top-left { display: flex; flex-direction: column; gap: 2px; }
.top-phase { font-family: 'IBM Plex Mono', monospace; font-size: 0.63rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.top-step  { font-family: 'IBM Plex Mono', monospace; font-size: 0.63rem; color: var(--text-muted); }
.top-right { display: flex; align-items: center; gap: 8px; }
.animal-badge { font-size: 0.71rem; font-weight: 600; padding: 3px 8px; border-radius: 10px; border: 1px solid; }
.animal-badge.poulet { background: var(--green-pale); color: var(--green);  border-color: var(--green-dim); }
.animal-badge.canard { background: var(--blue-pale);  color: var(--blue);   border-color: #1e4a8a; }
.animal-badge.lapin  { background: var(--purple-pale);color: var(--purple); border-color: #6b21a8; }
.animal-badge.dinde  { background: var(--amber-pale); color: var(--amber);  border-color: var(--amber-dim); }
.bird-indicator { font-family: 'IBM Plex Mono', monospace; font-size: 0.67rem; color: var(--text-muted); }
.btn-icon { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1rem; padding: 6px; }
.progress-strip { height: 3px; background: var(--border); flex-shrink: 0; }

.main-area { flex: 1; overflow-y: auto; padding: 1.1rem 1rem 0.8rem; display: flex; flex-direction: column; gap: 0.8rem; }

/* STEP CARD */
.step-main {
  background: var(--bg3); border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg); padding: 1.2rem 1.2rem 1rem;
  animation: slideIn 0.22s ease;
}
@keyframes slideIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.step-phase-tag { font-size: 0.67rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green); margin-bottom: 0.45rem; opacity: 0.8; }
.step-title-main { font-family: 'IBM Plex Mono', monospace; font-size: 1.08rem; font-weight: 600; color: var(--text); line-height: 1.3; margin-bottom: 0.65rem; }
.step-desc { font-size: 0.9rem; color: var(--text-dim); line-height: 1.78; }
.step-desc strong { color: var(--text); font-weight: 600; }
.diff-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 10px; font-size: 0.68rem; font-weight: 600; margin-bottom: 8px; }
.diff-badge.debutant  { background: var(--amber-pale); color: var(--amber); }
.diff-badge.attention { background: var(--red-pale);   color: var(--red); }

/* MULTI-ANIMAL BANNER */
.bird-banner {
  background: var(--bg2); border: 1px solid var(--border-bright);
  border-radius: var(--radius-md); padding: 0.85rem 1.1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.bird-banner-title { font-family: 'IBM Plex Mono', monospace; font-size: 0.83rem; font-weight: 600; color: var(--green); }
.bird-banner-sub   { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.bird-dots { display: flex; gap: 5px; flex-wrap: wrap; max-width: 120px; }
.bird-dot  { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--border-bright); background: var(--bg); transition: all 0.3s; }
.bird-dot.done-bird    { background: var(--green-dim); border-color: var(--green); }
.bird-dot.current-bird { background: var(--green); border-color: var(--green); box-shadow: 0 0 5px var(--green); }

/* RENDEMENT BLOCK */
.rendement-block {
  background: var(--bg2); border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm); padding: 11px 13px; margin-top: 10px;
}
.rend-title { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.rend-grid  { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.rend-item  { background: var(--bg3); border-radius: 7px; padding: 8px; text-align: center; }
.rend-val   { font-family: 'IBM Plex Mono', monospace; font-size: 1rem; font-weight: 600; color: var(--green); }
.rend-label { font-size: 0.68rem; color: var(--text-muted); margin-top: 2px; }

/* BOTTOM BAR — GROS BOUTONS pour mains sales/gants */
.bottom-bar {
  padding: 0.85rem 1rem 1rem;
  display: flex; gap: 10px; flex-shrink: 0;
  border-top: 1px solid var(--border); background: var(--bg);
}
.btn-prev {
  flex: 0 0 90px; padding: 1rem;
  background: var(--bg3); color: var(--text-dim);
  border: 1px solid var(--border-bright); border-radius: 14px;
  font-family: 'IBM Plex Sans', sans-serif; font-size: 0.88rem; cursor: pointer;
  min-height: 56px;
}
.btn-prev:disabled { opacity: 0.3; cursor: default; }
.btn-next {
  flex: 1; padding: 1rem;
  background: var(--green); color: #0a1a0c;
  border: none; border-radius: 14px;
  font-family: 'IBM Plex Sans', sans-serif; font-size: 1rem; font-weight: 600;
  cursor: pointer; min-height: 56px;
}
.btn-next:active { opacity: 0.85; }
.btn-next.last { background: var(--amber); }
.btn-emergency {
  flex: 0 0 56px; padding: 0; min-height: 56px;
  background: var(--red-pale); color: var(--red);
  border: 1px solid var(--red-dim); border-radius: 14px;
  font-size: 1.2rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
}

/* ══════════════════════════════════════════
   URGENCES
══════════════════════════════════════════ */
#screen-emergency {
  flex-direction: column; max-width: 600px; margin: 0 auto;
}
.emergency-header {
  background: var(--red-pale); border-bottom: 1px solid var(--red-dim);
  padding: 0.85rem 1.1rem; flex-shrink: 0;
  display: flex; align-items: center; gap: 10px;
}
.emergency-header-title { font-family: 'IBM Plex Mono', monospace; font-size: 0.95rem; font-weight: 600; color: var(--red); }
.emergency-header-sub   { font-size: 0.72rem; color: var(--red); opacity: 0.7; }
.emergency-body { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.8rem; }
.emergency-card {
  background: var(--bg3); border: 1px solid var(--border-bright);
  border-radius: var(--radius-md); overflow: hidden;
}
.emergency-card-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; cursor: pointer;
}
.emergency-card-icon  { font-size: 1.3rem; flex-shrink: 0; }
.emergency-card-title { font-size: 0.88rem; font-weight: 600; color: var(--text); flex: 1; }
.emergency-card-title span { display: block; font-size: 0.73rem; font-weight: 400; color: var(--text-muted); margin-top: 1px; }
.emergency-card-body  { display: none; padding: 0 14px 13px 46px; font-size: 0.84rem; color: var(--text-dim); line-height: 1.75; }
.emergency-card-body.open { display: block; }
.emergency-steps { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }
.emergency-step {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--bg2); border-radius: 8px; padding: 9px 11px;
}
.e-step-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--red-pale); color: var(--red);
  font-size: 0.72rem; font-weight: 700; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.e-step-text { font-size: 0.83rem; color: var(--text-dim); line-height: 1.6; }
.e-step-text strong { color: var(--text); }
.emergency-footer {
  padding: 0.85rem 1rem 1rem; border-top: 1px solid var(--border);
  flex-shrink: 0; background: var(--bg);
}
.btn-close-emergency {
  width: 100%; padding: 1rem;
  background: var(--bg3); color: var(--text-dim);
  border: 1px solid var(--border-bright); border-radius: 12px;
  font-family: 'IBM Plex Sans', sans-serif; font-size: 0.95rem; font-weight: 500; cursor: pointer;
}

/* ══════════════════════════════════════════
   TIMER
══════════════════════════════════════════ */
.timer-block { display: flex; flex-direction: column; align-items: center; padding: 0.9rem 0 0.3rem; gap: 0.5rem; }
.timer-ring-wrap { position: relative; width: 130px; height: 130px; }
.timer-ring-wrap svg { position: absolute; top: 0; left: 0; transform: rotate(-90deg); }
.timer-ring-bg   { fill: none; stroke: var(--border); stroke-width: 6; }
.timer-ring-fill { fill: none; stroke: var(--green); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 377; stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear, stroke 0.3s; }
.timer-ring-fill.warn { stroke: var(--amber); }
.timer-ring-fill.crit { stroke: var(--red); }
.timer-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; }
.timer-mm { font-family: 'IBM Plex Mono', monospace; font-size: 1.75rem; font-weight: 600; line-height: 1; color: var(--text); }
.timer-label-small { font-size: 0.62rem; color: var(--text-muted); margin-top: 3px; text-transform: uppercase; letter-spacing: 0.06em; }
.timer-status       { font-size: 0.79rem; color: var(--text-muted); }
.timer-status.active { color: var(--green); }
.timer-status.done-t { color: var(--amber); }
.btn-timer {
  padding: 0.6rem 1.4rem; background: var(--bg2); color: var(--text-dim);
  border: 1px solid var(--border-bright); border-radius: 20px;
  font-family: 'IBM Plex Sans', sans-serif; font-size: 0.85rem; font-weight: 500; cursor: pointer;
}
.btn-timer:active { background: var(--green-pale); }

/* ══════════════════════════════════════════
   ÉCRAN FIN
══════════════════════════════════════════ */
#screen-done {
  flex-direction: column; align-items: center; justify-content: center;
  padding: 2rem; text-align: center; gap: 1.1rem;
  overflow-y: auto;
}
.done-logo  { width: 64px; height: 64px; object-fit: contain; border-radius: 14px; margin-bottom: 0.2rem; }
.done-icon  { font-size: 2.8rem; }
.done-title { font-family: 'IBM Plex Mono', monospace; font-size: 1.2rem; font-weight: 600; color: var(--green); }
.done-sub   { font-size: 0.86rem; color: var(--text-dim); line-height: 1.7; max-width: 300px; }
.done-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 300px; }
.done-stat  { background: var(--bg3); border-radius: 10px; padding: 12px; }
.done-stat .ds-val   { font-family: 'IBM Plex Mono', monospace; font-size: 1.35rem; font-weight: 600; color: var(--green); }
.done-stat .ds-label { font-size: 0.71rem; color: var(--text-muted); margin-top: 3px; }
.done-cta-card {
  width: 100%; max-width: 300px;
  background: var(--bg3); border: 1px solid var(--border-bright);
  border-radius: 14px; padding: 1rem 1.2rem;
  display: flex; flex-direction: column; gap: 8px;
}
.done-cta-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 2px; }
.btn-cta-site {
  width: 100%; padding: 0.85rem; background: var(--green); color: #0a1a0c;
  border: none; border-radius: 10px;
  font-family: 'IBM Plex Sans', sans-serif; font-size: 0.9rem; font-weight: 600; cursor: pointer;
  text-decoration: none; display: block; text-align: center;
}
.btn-cta-contact {
  width: 100%; padding: 0.75rem; background: var(--bg2); color: var(--text-dim);
  border: 1px solid var(--border-bright); border-radius: 10px;
  font-family: 'IBM Plex Sans', sans-serif; font-size: 0.88rem; cursor: pointer;
  text-decoration: none; display: block; text-align: center;
}
.btn-restart { padding: 0.85rem 2rem; background: var(--bg3); color: var(--text-muted); border: 1px solid var(--border-bright); border-radius: 12px; font-family: 'IBM Plex Sans', sans-serif; font-size: 0.88rem; font-weight: 500; cursor: pointer; }
.done-brand { font-size: 0.7rem; color: var(--text-muted); opacity: 0.6; }

/* ══════════════════════════════════════════
   HEADER COMMUN (santé, équip, urgence)
══════════════════════════════════════════ */
.screen-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 1.1rem 0.65rem;
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.screen-header-left { display: flex; flex-direction: column; gap: 2px; }
.screen-header-title { font-family: 'IBM Plex Mono', monospace; font-size: 0.93rem; font-weight: 600; color: var(--text); }
.screen-header-sub   { font-size: 0.71rem; color: var(--text-muted); }
