/* EasyGas — espace fournisseur */
.egs {
  --egs-bg: #f3f4f6;
  --egs-ink: #0e1116;
  --egs-ink-2: #2a2f3a;
  --egs-muted: #6b7180;
  --egs-line: #e6e8ec;
  --egs-orange: #ff6a00;
  --egs-out: #e5484d;
  --egs-critical: #f76808;
  --egs-low: #f5a524;
  --egs-ok: #12b76a;
  --egs-blue: #2f6bff;
  --egs-shadow: 0 1px 2px rgba(14, 17, 22, 0.04), 0 14px 34px -18px rgba(14, 17, 22, 0.2);
  --egs-ease: cubic-bezier(0.22, 1, 0.36, 1);
  min-height: 100vh;
  padding-bottom: 6rem;
  background: var(--egs-bg);
  color: var(--egs-ink);
  font-family: var(--ecm-font-body, Inter, system-ui, sans-serif);
}
.egs *, .egs *::before, .egs *::after { box-sizing: border-box; }
.egs a { color: inherit; }
.egs-wrap { width: min(1240px, 100% - 1.5rem); margin: 0 auto; }
.egs-wrap--narrow { width: min(760px, 100% - 1.5rem); }
.egs-main { padding-top: 1.25rem; }
.egs-muted { color: var(--egs-muted); }
.egs-mt { margin-top: 0.6rem; }

/* Navigation */
.egs-nav { position: sticky; top: 0; z-index: 1010; background: var(--egs-ink); color: #fff; }
.egs-nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: min(1240px, 100% - 1.5rem); min-height: 64px; margin: 0 auto; }
.egs-nav__brand { display: flex; align-items: center; gap: 0.7rem; min-width: 0; color: #fff !important; text-decoration: none; }
.egs-nav__brand > span { display: grid; flex: 0 0 auto; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--egs-orange); }
.egs-nav__brand strong { display: block; overflow: hidden; max-width: 220px; font-size: 0.92rem; white-space: nowrap; text-overflow: ellipsis; }
.egs-nav__brand small { color: rgba(255, 255, 255, 0.55); font-size: 0.68rem; }
.egs-nav__links { display: flex; gap: 0.25rem; }
.egs-nav__links a { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0.9rem; border-radius: 12px; color: rgba(255, 255, 255, 0.7) !important; font-size: 0.85rem; font-weight: 650; text-decoration: none; transition: background 0.2s, color 0.2s; }
.egs-nav__links a:hover { color: #fff !important; }
.egs-nav__links a.is-active { background: rgba(255, 255, 255, 0.12); color: #fff !important; }

/* Boutons */
.egs-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 44px; padding: 0 1.05rem; border: 1px solid transparent; border-radius: 13px; font: inherit; font-size: 0.86rem; font-weight: 700; white-space: nowrap; text-decoration: none; cursor: pointer; transition: transform 0.2s var(--egs-ease), box-shadow 0.25s, background 0.2s; }
.egs-btn:active { transform: scale(0.98); }
.egs-btn:disabled { opacity: 0.65; cursor: wait; }
.egs-btn--primary { background: var(--egs-orange); color: #fff !important; box-shadow: 0 10px 22px -10px rgba(255, 106, 0, 0.7); }
.egs-btn--primary:hover { box-shadow: 0 14px 28px -10px rgba(255, 106, 0, 0.8); transform: translateY(-1px); }
.egs-btn--dark { background: var(--egs-ink); color: #fff !important; }
.egs-btn--soft { border-color: var(--egs-line); background: #fff; color: var(--egs-ink) !important; }
.egs-btn--soft:hover { border-color: #c9cdd5; }
.egs-btn--light { background: #fff; color: var(--egs-ink) !important; }
.egs-btn--glass { border-color: rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.08); color: #fff !important; }
.egs-btn--danger { background: var(--egs-out); color: #fff !important; }
.egs-btn--sm { min-height: 36px; padding: 0 0.75rem; border-radius: 10px; font-size: 0.78rem; }
.egs-btn--lg { min-height: 52px; padding: 0 1.4rem; font-size: 0.95rem; }
.egs-btn--block { width: 100%; }
.egs-iconbtn { display: grid; flex: 0 0 auto; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--egs-ink); color: #fff !important; text-decoration: none; }

/* Messages */
.egs-flash { display: flex; align-items: flex-start; gap: 0.7rem; width: min(1240px, 100% - 1.5rem); margin: 0 auto 1rem; padding: 0.85rem 1rem; border-radius: 14px; font-size: 0.88rem; font-weight: 600; }
.egs-flash ul { margin: 0; padding-left: 1rem; }
.egs-flash--ok { background: #e7f8ef; color: #0b6b40; }
.egs-flash--err { background: #fdecec; color: #a3272b; }

/* En-têtes */
.egs-eyebrow { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--egs-orange); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.egs-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin: 0.5rem 0 1.5rem; }
.egs-head h1 { margin: 0.35rem 0 0.25rem; font-size: clamp(1.7rem, 3.6vw, 2.4rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.045em; }
.egs-head p { margin: 0; color: var(--egs-muted); font-size: 0.9rem; }
.egs-head__actions { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.egs-backlink { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--egs-muted) !important; font-size: 0.8rem; font-weight: 700; text-decoration: none; }

/* KPIs */
.egs-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.egs-kpi { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 0.8rem; align-items: center; padding: 1rem; border: 0; border-radius: 20px; background: #fff; color: var(--egs-ink); font: inherit; text-align: left; box-shadow: var(--egs-shadow); cursor: pointer; transition: transform 0.25s var(--egs-ease); }
div.egs-kpi { cursor: default; }
button.egs-kpi:hover { transform: translateY(-2px); }
.egs-kpi__icon { grid-row: span 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; }
.egs-kpi strong { font-size: 1.75rem; font-weight: 800; line-height: 1.05; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.egs-kpi strong small { color: var(--egs-muted); font-size: 0.95rem; }
.egs-kpi > span:last-child { color: var(--egs-muted); font-size: 0.76rem; font-weight: 600; }
.egs-kpi--out .egs-kpi__icon { background: #fdecec; color: var(--egs-out); }
.egs-kpi--critical .egs-kpi__icon { background: #fff0e5; color: var(--egs-critical); }
.egs-kpi--low .egs-kpi__icon { background: #fff7e0; color: #c58300; }
.egs-kpi--road .egs-kpi__icon { background: #eaf0ff; color: var(--egs-blue); }

/* Radar */
.egs-radar { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1rem; margin-bottom: 1.5rem; }
.egs-mapcard { position: relative; overflow: hidden; border-radius: 22px; background: #fff; box-shadow: var(--egs-shadow); }
.egs-map { height: 380px; background: linear-gradient(135deg, #e4e9ef, #d3dbe4); }
.egs-mapcard--tall .egs-map { height: 420px; }
.egs-map.is-empty::after { content: "Carte indisponible"; display: grid; place-items: center; height: 100%; color: var(--egs-muted); font-size: 0.85rem; }
.egs-legend { position: absolute; bottom: 12px; left: 12px; z-index: 500; display: flex; flex-wrap: wrap; gap: 0.7rem; padding: 0.45rem 0.75rem; border-radius: 12px; background: rgba(255, 255, 255, 0.94); font-size: 0.72rem; font-weight: 650; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1); }
.egs-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.egs-legend i { width: 10px; height: 10px; border-radius: 50%; }
.egs-legend .is-out { background: var(--egs-out); } .egs-legend .is-critical { background: var(--egs-critical); } .egs-legend .is-low { background: var(--egs-low); } .egs-legend .is-ok { background: var(--egs-ok); }

.egs-mk span { display: grid; place-items: center; width: 30px; height: 30px; border: 3px solid #fff; border-radius: 50%; background: var(--c); color: #fff; font-size: 0.72rem; font-weight: 800; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25); }
.egs-mk.is-pulse span { animation: egsPulse 1.8s infinite; }
@keyframes egsPulse { 0% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0.55); } 70% { box-shadow: 0 0 0 14px rgba(229, 72, 77, 0); } 100% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0); } }
.egs-mk.is-driver span { --c: #2f6bff; }
.egs-pop { display: flex; flex-direction: column; gap: 0.15rem; min-width: 160px; font-family: var(--ecm-font-body, Inter, system-ui, sans-serif); }
.egs-pop span { color: #6b7180; font-size: 0.78rem; }
.egs-pop a { margin-top: 0.35rem; color: #ff6a00 !important; font-weight: 700; text-decoration: none; }

.egs-livechip { position: absolute; top: 12px; left: 12px; z-index: 500; display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.8rem; border-radius: 999px; background: var(--egs-ink); color: #fff; font-size: 0.76rem; font-weight: 700; }
.egs-livechip span { width: 8px; height: 8px; border-radius: 50%; background: #34d399; animation: egsBlink 1.4s infinite; }
@keyframes egsBlink { 50% { opacity: 0.3; } }

.egs-upcoming { display: flex; flex-direction: column; overflow: hidden; border-radius: 22px; background: #fff; box-shadow: var(--egs-shadow); }
.egs-upcoming__head { display: flex; align-items: baseline; justify-content: space-between; padding: 1rem 1.1rem 0.6rem; }
.egs-upcoming__head h2 { margin: 0; font-size: 1rem; font-weight: 800; }
.egs-upcoming__head span { color: var(--egs-muted); font-size: 0.76rem; font-weight: 600; }
.egs-upcoming__item { display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 1.1rem; border-top: 1px solid var(--egs-line); text-decoration: none; transition: background 0.2s; }
.egs-upcoming__item:hover { background: #fafafb; }
.egs-upcoming__body { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; }
.egs-upcoming__body strong { overflow: hidden; font-size: 0.86rem; white-space: nowrap; text-overflow: ellipsis; }
.egs-upcoming__body small { overflow: hidden; color: var(--egs-muted); font-size: 0.74rem; white-space: nowrap; text-overflow: ellipsis; }
.egs-upcoming .egs-pill { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.egs-upcoming__foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding: 0.8rem 1.1rem; border-top: 1px solid var(--egs-line); background: #fafafb; font-size: 0.78rem; font-weight: 650; }
.egs-upcoming__foot a { color: var(--egs-orange) !important; text-decoration: none; }

.egs-date { display: flex; flex: 0 0 auto; flex-direction: column; align-items: center; justify-content: center; width: 44px; height: 46px; border-radius: 12px; background: #f3f4f6; line-height: 1; }
.egs-date b { font-size: 1.05rem; font-weight: 800; }
.egs-date small { margin-top: 2px; color: var(--egs-muted); font-size: 0.62rem; font-weight: 700; text-transform: uppercase; }

/* Filtres */
.egs-toolbar { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1rem; }
.egs-search { position: relative; flex: 1 1 260px; }
.egs-search > i { position: absolute; top: 50%; left: 0.95rem; color: var(--egs-muted); transform: translateY(-50%); }
.egs-search .egs-input { padding-left: 2.5rem; }
.egs-select { position: relative; }
.egs-select .egs-input { padding-right: 2.2rem; cursor: pointer; }
.egs-select > i { position: absolute; top: 50%; right: 0.85rem; color: var(--egs-muted); font-size: 0.65rem; pointer-events: none; transform: translateY(-50%); }
.egs-segment { display: inline-flex; padding: 4px; border: 1px solid var(--egs-line); border-radius: 13px; background: #fff; }
.egs-segment button { padding: 0 0.85rem; min-height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--egs-muted); font: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer; }
.egs-segment button.is-active { background: var(--egs-ink); color: #fff; }

/* Champs */
.egs-input { width: 100%; min-height: 46px; padding: 0.6rem 0.85rem; border: 1px solid var(--egs-line); border-radius: 13px; background: #fff; color: var(--egs-ink); font: inherit; font-size: 0.92rem; transition: border-color 0.2s, box-shadow 0.25s; -webkit-appearance: none; appearance: none; }
textarea.egs-input { resize: vertical; }
.egs-input:focus { outline: none; border-color: var(--egs-ink); box-shadow: 0 0 0 4px rgba(14, 17, 22, 0.07); }
.egs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }
.egs-grid--1 { grid-template-columns: 1fr; }
.egs-span-2 { grid-column: span 2; }
.egs-field { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.egs-field > label, .egs-label { font-size: 0.78rem; font-weight: 700; }
.egs-field label em { color: var(--egs-orange); font-style: normal; }
.egs-label small { color: var(--egs-muted); font-weight: 500; }
.egs-affix { position: relative; }
.egs-affix .egs-input { padding-right: 3.3rem; }
.egs-affix > span { position: absolute; top: 50%; right: 0.5rem; padding: 0.15rem 0.4rem; border-radius: 6px; background: #f1f2f4; color: var(--egs-muted); font-size: 0.64rem; font-weight: 800; pointer-events: none; transform: translateY(-50%); }

.egs-chipset { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.egs-chipcheck { position: relative; cursor: pointer; }
.egs-chipcheck input { position: absolute; opacity: 0; }
.egs-chipcheck span { display: inline-flex; padding: 0.45rem 0.8rem; border: 1px solid var(--egs-line); border-radius: 999px; background: #fff; font-size: 0.8rem; font-weight: 650; transition: all 0.2s; }
.egs-chipcheck input:checked + span { border-color: var(--egs-ink); background: var(--egs-ink); color: #fff; }
.egs-chipcheck input:focus-visible + span { outline: 3px solid rgba(255, 106, 0, 0.4); }

/* Cartes */
.egs-card { margin-bottom: 1rem; padding: 1.25rem; border-radius: 22px; background: #fff; box-shadow: var(--egs-shadow); }
.egs-card--flush { padding: 0; overflow: hidden; }
.egs-card__head { margin-bottom: 1rem; }
.egs-card__head--row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.egs-card__head h2 { display: flex; align-items: center; gap: 0.55rem; margin: 0 0 0.2rem; font-size: 1.05rem; font-weight: 800; letter-spacing: -0.02em; }
.egs-card__head p { margin: 0; color: var(--egs-muted); font-size: 0.82rem; }
.egs-card__tools { display: flex; gap: 0.4rem; }
.egs-step { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--egs-ink); color: #fff; font-size: 0.75rem; }
.egs-center { text-align: center; }
.egs-form__foot { margin-top: 1.25rem; }

/* Niveaux & pastilles */
.egs-level { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.55rem; border-radius: 999px; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.02em; }
.egs-level::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.egs-level.is-out { background: #fdecec; color: var(--egs-out); }
.egs-level.is-critical { background: #fff0e5; color: var(--egs-critical); }
.egs-level.is-low { background: #fff7e0; color: #b07400; }
.egs-level.is-ok { background: #e7f8ef; color: #0b8a50; }
.egs-level--lg { padding: 0.45rem 0.9rem; font-size: 0.82rem; }

.egs-pill { flex: 0 0 auto; padding: 0.28rem 0.6rem; border-radius: 999px; background: #f1f2f5; color: var(--egs-muted); font-size: 0.7rem; font-weight: 700; white-space: nowrap; }
.egs-pill--lg { padding: 0.5rem 0.9rem; font-size: 0.82rem; }
.egs-pill.is-scheduled { background: #f1f2f5; color: var(--egs-ink-2); }
.egs-pill.is-assigned { background: #fff0e5; color: #c2410c; }
.egs-pill.is-accepted, .egs-pill.is-in_transit { background: #eaf0ff; color: #1d4ed8; }
.egs-pill.is-delivered { background: #fff7e0; color: #8a5a00; }
.egs-pill.is-received { background: #e7f8ef; color: #0b6b40; }
.egs-pill.is-cancelled { background: #fdecec; color: #a3272b; }

/* Dépôts */
.egs-depots { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 1rem; scroll-margin-top: 80px; }
.egs-depot { display: flex; flex-direction: column; padding: 1.1rem; border-radius: 22px; background: #fff; box-shadow: var(--egs-shadow); border-top: 4px solid transparent; }
.egs-depot[hidden] { display: none; }
.egs-depot.is-out { border-top-color: var(--egs-out); }
.egs-depot.is-critical { border-top-color: var(--egs-critical); }
.egs-depot.is-low { border-top-color: var(--egs-low); }
.egs-depot__head { display: flex; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.9rem; }
.egs-depot__id { min-width: 0; }
.egs-depot__id h3 { margin: 0.4rem 0 0.15rem; overflow: hidden; font-size: 1.08rem; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; text-overflow: ellipsis; }
.egs-depot__id p { margin: 0; color: var(--egs-muted); font-size: 0.78rem; }
.egs-depot__meta { display: flex; flex: 0 0 auto; flex-direction: column; align-items: flex-end; gap: 0.35rem; }
.egs-days { color: var(--egs-muted); font-size: 0.72rem; font-weight: 600; text-align: right; }
.egs-days b { color: var(--egs-ink); font-size: 1.2rem; font-weight: 800; }
.egs-days.is-hot b { color: var(--egs-out); }
.egs-incoming { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.5rem; border-radius: 8px; background: #eaf0ff; color: #1d4ed8; font-size: 0.7rem; font-weight: 700; }
.egs-depot__none { margin: 0 0 0.9rem; font-size: 0.82rem; }

.egs-stock { display: flex; flex-direction: column; gap: 0.55rem; margin: 0 0 0.6rem; padding: 0; list-style: none; }
.egs-stock li { display: grid; grid-template-columns: 120px 1fr 56px; align-items: center; gap: 0.7rem; }
.egs-stock__name { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.egs-stock__name strong { overflow: hidden; font-size: 0.8rem; white-space: nowrap; text-overflow: ellipsis; }
.egs-stock__name span { color: var(--egs-muted); font-size: 0.7rem; }
.egs-stock__bar { position: relative; height: 8px; overflow: visible; border-radius: 99px; background: #eef0f3; }
.egs-stock__bar span { display: block; height: 100%; border-radius: inherit; background: var(--egs-ok); transition: width 0.6s var(--egs-ease); }
.egs-stock__bar i { position: absolute; top: -3px; bottom: -3px; width: 2px; border-radius: 2px; background: rgba(14, 17, 22, 0.35); }
.egs-stock li.is-out .egs-stock__bar span { background: var(--egs-out); }
.egs-stock li.is-critical .egs-stock__bar span { background: var(--egs-critical); }
.egs-stock li.is-low .egs-stock__bar span { background: var(--egs-low); }
.egs-stock__qty { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.egs-stock__qty strong { font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.egs-stock li.is-out .egs-stock__qty strong { color: var(--egs-out); }
.egs-stock__qty small { color: var(--egs-muted); font-size: 0.66rem; }
.egs-more { margin: 0 0 0.6rem; font-size: 0.74rem; }
.egs-depot__foot { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-top: auto; padding-top: 0.9rem; border-top: 1px solid var(--egs-line); }
.egs-depot__contact { display: flex; align-items: center; gap: 0.5rem; min-width: 0; font-size: 0.8rem; font-weight: 650; }
.egs-depot__contact span { display: flex; min-width: 0; flex-direction: column; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.egs-depot__contact small { overflow: hidden; color: var(--egs-muted); font-size: 0.68rem; font-weight: 500; text-overflow: ellipsis; }
.egs-depot__actions { display: flex; align-items: center; justify-content: flex-end; gap: 0.4rem; }
.egs-depot__actions .egs-btn span { display: inline; }
.egs-iconbtn.is-whatsapp { background: #128c4b; }
.egs-iconbtn.is-route { background: #2768d8; }
.egs-distance { display: inline-flex; align-items: center; gap: 0.3rem; margin-top: 0.4rem; color: #2768d8; font-size: 0.72rem; font-weight: 750; }
.egs-distance[hidden] { display: none; }

/* Dock fournisseur : navigation au pouce, indépendante du chrome du site. */
.egs-mobile-dock { display: none; }

.egs-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 0.3rem; padding: 2.5rem 1rem; color: var(--egs-muted); font-size: 0.84rem; text-align: center; }
.egs-empty[hidden] { display: none; }
.egs-empty i { margin-bottom: 0.4rem; color: #c3c7cf; font-size: 1.6rem; }
.egs-empty strong { color: var(--egs-ink); }
.egs-empty--sm { padding: 1.5rem 1rem; }

/* Onglets & lignes */
.egs-tabs { display: flex; gap: 0.35rem; margin-bottom: 1rem; overflow-x: auto; scrollbar-width: none; }
.egs-tabs a { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 0.4rem; padding: 0.5rem 0.85rem; border-radius: 999px; background: #fff; color: var(--egs-muted) !important; font-size: 0.8rem; font-weight: 700; text-decoration: none; }
.egs-tabs a span { padding: 0 0.4rem; border-radius: 99px; background: #f1f2f5; font-size: 0.7rem; }
.egs-tabs a.is-active { background: var(--egs-ink); color: #fff !important; }
.egs-tabs a.is-active span { background: rgba(255, 255, 255, 0.18); }
.egs-row { display: flex; align-items: center; gap: 0.85rem; padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--egs-line); text-decoration: none; transition: background 0.2s; }
.egs-row:last-child { border-bottom: 0; }
a.egs-row:hover { background: #fafafb; }
.egs-row.is-muted { opacity: 0.55; }
.egs-row__main { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; }
.egs-row__main strong { overflow: hidden; font-size: 0.9rem; white-space: nowrap; text-overflow: ellipsis; }
.egs-row__main strong em { margin-left: 0.35rem; color: var(--egs-muted); font-size: 0.72rem; font-style: normal; font-weight: 600; }
.egs-row__main small { overflow: hidden; color: var(--egs-muted); font-size: 0.76rem; white-space: nowrap; text-overflow: ellipsis; }
.egs-row__driver { flex: 0 0 170px; overflow: hidden; font-size: 0.8rem; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.egs-row__driver a { text-decoration: none; }
.egs-pagination { margin-top: 1rem; }

/* Planification */
.egs-planner { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; align-items: start; }
.egs-planner__side { position: sticky; top: 80px; }
.egs-lines { display: flex; flex-direction: column; gap: 0.5rem; }
.egs-line { display: grid; grid-template-columns: minmax(0, 1fr) 150px 140px auto; align-items: center; gap: 0.7rem; padding: 0.7rem 0.8rem; border: 1px solid var(--egs-line); border-left: 4px solid var(--egs-line); border-radius: 16px; transition: border-color 0.2s, background 0.2s; }
.egs-line.is-out { border-left-color: var(--egs-out); } .egs-line.is-critical { border-left-color: var(--egs-critical); } .egs-line.is-low { border-left-color: var(--egs-low); } .egs-line.is-ok { border-left-color: var(--egs-ok); }
.egs-line.has-qty { background: #fffaf5; border-color: #ffd9bd; }
.egs-line__product { display: flex; flex-direction: column; min-width: 0; }
.egs-line__product strong { font-size: 0.9rem; }
.egs-line__product strong span { color: var(--egs-muted); font-weight: 600; }
.egs-line__product small { overflow: hidden; color: var(--egs-muted); font-size: 0.72rem; white-space: nowrap; text-overflow: ellipsis; }
.egs-line__product small .egs-level { padding: 0.05rem 0.4rem; }
.egs-line__pick { display: grid; grid-template-columns: 1fr 110px; gap: 0.5rem; }
.egs-line__qty { display: grid; grid-template-columns: 36px 1fr 36px; align-items: center; overflow: hidden; border: 1px solid var(--egs-line); border-radius: 13px; background: #fff; }
.egs-line__qty button { height: 44px; border: 0; background: #f6f7f9; color: var(--egs-ink); cursor: pointer; }
.egs-line__qty .egs-input { min-height: 44px; padding: 0; border: 0; border-radius: 0; font-weight: 800; text-align: center; box-shadow: none; -moz-appearance: textfield; }
.egs-line__qty .egs-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.egs-line__remove { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 10px; background: #f3f4f6; color: var(--egs-muted); cursor: pointer; }
.egs-addline { display: flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%; min-height: 46px; margin-top: 0.6rem; border: 1.5px dashed #cfd3da; border-radius: 14px; background: transparent; color: var(--egs-ink-2); font: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer; }
.egs-addline:hover { border-color: var(--egs-orange); color: var(--egs-orange); }

.egs-drivers { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0.5rem; }
.egs-driver { position: relative; margin: 0; cursor: pointer; }
.egs-driver input { position: absolute; opacity: 0; }
.egs-driver__card { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem; border: 1.5px solid var(--egs-line); border-radius: 14px; transition: all 0.2s; }
.egs-driver__card > span:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.egs-driver__card strong { overflow: hidden; font-size: 0.84rem; white-space: nowrap; text-overflow: ellipsis; }
.egs-driver__card small { color: var(--egs-muted); font-size: 0.7rem; }
.egs-driver input:checked + .egs-driver__card { border-color: var(--egs-ink); background: #f7f7f8; box-shadow: inset 0 0 0 1px var(--egs-ink); }
.egs-driver input:focus-visible + .egs-driver__card { outline: 3px solid rgba(255, 106, 0, 0.4); }

.egs-driver__avatar, .egs-person__avatar { position: relative; display: grid; flex: 0 0 auto; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--egs-ink); color: #fff; font-weight: 800; }
.egs-driver__avatar.is-none { background: #f1f2f5; color: var(--egs-muted); }
.egs-driver__avatar i, .egs-person__avatar i { position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border: 2px solid #fff; border-radius: 50%; background: #c3c7cf; }
.egs-driver__avatar i.is-on, .egs-person__avatar i.is-on { background: var(--egs-ok); }
.egs-person__avatar.is-depot { background: #e7f8ef; color: #0b8a50; }

.egs-summary { padding: 1.25rem; border-radius: 22px; background: var(--egs-ink); color: #fff; box-shadow: var(--egs-shadow); }
.egs-summary__total { display: flex; align-items: baseline; gap: 0.5rem; margin: 0.35rem 0 0.75rem; }
.egs-summary__total strong { font-size: 3rem; font-weight: 800; line-height: 1; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.egs-summary__total span { color: rgba(255, 255, 255, 0.6); font-weight: 600; }
.egs-summary__amount { display: flex; justify-content: space-between; margin-bottom: 0.9rem; padding: 0.6rem 0.8rem; border-radius: 12px; background: rgba(255, 255, 255, 0.08); font-size: 0.82rem; }
.egs-summary__depot { display: flex; flex-direction: column; gap: 0.3rem; padding: 0.9rem 0; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.82rem; }
.egs-summary__depot a { color: #fff !important; text-decoration: none; }
.egs-summary__depot span:not(.egs-incoming) { color: rgba(255, 255, 255, 0.7); }
.egs-summary__alerts { margin: 0 0 1rem; padding: 0; list-style: none; }
.egs-summary__alerts li { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.45rem 0; border-top: 1px dashed rgba(255, 255, 255, 0.12); font-size: 0.78rem; }
.egs-summary__alerts li.is-out b { color: #ff8c8f; } .egs-summary__alerts li.is-critical b { color: #ffb37a; }

/* Détail */
.egs-detail { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 1rem; align-items: start; }
.egs-detail__main .egs-mapcard { margin-bottom: 1rem; }
.egs-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.egs-table th { padding: 0.5rem; border-bottom: 1px solid var(--egs-line); color: var(--egs-muted); font-size: 0.72rem; font-weight: 700; text-align: left; text-transform: uppercase; letter-spacing: 0.04em; }
.egs-table td { padding: 0.65rem 0.5rem; border-bottom: 1px solid var(--egs-line); }
.egs-table tfoot td { border-bottom: 0; font-weight: 800; }
.egs-table .t-num { text-align: right; font-variant-numeric: tabular-nums; }
.egs-notes { display: flex; gap: 0.5rem; margin: 0.9rem 0 0; padding: 0.7rem 0.85rem; border-radius: 12px; background: #fafafb; color: var(--egs-ink-2); font-size: 0.84rem; }

.egs-timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.egs-timeline li { position: relative; display: flex; gap: 0.75rem; padding-bottom: 0.9rem; }
.egs-timeline li:not(:last-child)::before { content: ""; position: absolute; top: 32px; bottom: 2px; left: 15px; width: 2px; background: var(--egs-line); }
.egs-timeline li.is-done:not(:last-child)::before { background: var(--egs-ok); }
.egs-timeline__dot { position: relative; z-index: 1; display: grid; flex: 0 0 auto; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #f1f2f5; color: #b0b5be; font-size: 0.75rem; }
.egs-timeline li.is-done .egs-timeline__dot { background: var(--egs-ok); color: #fff; }
.egs-timeline li.is-current .egs-timeline__dot { background: var(--egs-orange); color: #fff; box-shadow: 0 0 0 5px rgba(255, 106, 0, 0.18); }
.egs-timeline li > div { display: flex; flex-direction: column; padding-top: 0.35rem; line-height: 1.25; }
.egs-timeline strong { font-size: 0.86rem; }
.egs-timeline li.is-todo strong { color: #a3a8b1; font-weight: 600; }
.egs-timeline small { color: var(--egs-muted); font-size: 0.72rem; }

.egs-person { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.8rem; }
.egs-person > div { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; line-height: 1.25; }
.egs-person strong { font-size: 0.9rem; }
.egs-person small { overflow: hidden; color: var(--egs-muted); font-size: 0.76rem; white-space: nowrap; text-overflow: ellipsis; }
.egs-inline-form { display: flex; flex-direction: column; gap: 0.5rem; }

.egs-danger { padding: 0.9rem 1rem; border: 1px solid #f6d0d1; border-radius: 18px; background: #fff; }
.egs-danger summary { color: var(--egs-out); font-size: 0.84rem; font-weight: 700; cursor: pointer; }
.egs-danger form { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.75rem; }

.egs-status { display: flex; align-items: flex-start; gap: 0.8rem; margin-bottom: 1rem; padding: 1rem; border-radius: 18px; background: #fff7e0; color: #7a5200; }
.egs-status > i { margin-top: 0.15rem; font-size: 1.2rem; }
.egs-status strong { display: block; font-size: 0.92rem; }
.egs-status span { font-size: 0.82rem; }
.egs-status--err { background: #fdecec; color: #a3272b; }
.egs-auth-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin-top: 1rem; }

/* Dépôt : approvisionnements entrants */
.egs-sectiontitle { margin: 1.5rem 0 0.75rem; font-size: 1.05rem; font-weight: 800; letter-spacing: -0.02em; }
.egs-inbound { border-left: 4px solid var(--egs-line); }
.egs-inbound.is-in_transit, .egs-inbound.is-accepted { border-left-color: var(--egs-blue); }
.egs-inbound.is-delivered { border-left-color: var(--egs-orange); }
.egs-inbound__head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem; margin-bottom: 1rem; }
.egs-inbound__title { display: flex; flex: 1 1 200px; flex-direction: column; min-width: 0; }
.egs-inbound__title strong { font-size: 1rem; }
.egs-inbound__title small { color: var(--egs-muted); font-size: 0.78rem; }
.egs-inbound__people { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 1rem; }
.egs-chip { display: inline-flex; padding: 0.4rem 0.7rem; border-radius: 10px; background: #f3f4f6; font-size: 0.8rem; font-weight: 650; }
.egs-receive { margin-top: 0.5rem; padding-top: 1rem; border-top: 1px solid var(--egs-line); }
.egs-receive__hint { display: flex; gap: 0.5rem; margin: 0 0 0.5rem; color: var(--egs-ink-2); font-size: 0.84rem; font-weight: 600; }
.egs-receive .egs-table { margin-bottom: 1rem; }
.egs-input--qty { width: 96px; min-height: 40px; margin-left: auto; font-weight: 800; text-align: right; }

/* Invitation */
.egs-invite { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; padding: 1.4rem; border-radius: 22px; background: radial-gradient(360px 200px at 100% 120%, rgba(255, 106, 0, 0.55), transparent 70%), var(--egs-ink); color: #fff; }
.egs-invite__code { display: block; margin: 0.35rem 0; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 2.2rem; font-weight: 800; letter-spacing: 0.12em; }
.egs-invite p { max-width: 460px; margin: 0; color: rgba(255, 255, 255, 0.65); font-size: 0.8rem; }
.egs-invite p b { color: #fff; word-break: break-all; }
.egs-invite__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* Accueil */
.egs-pitch { margin: 1rem 0 1.5rem; }
.egs-pitch h1 { margin: 0.6rem 0 0.75rem; font-size: clamp(2.1rem, 6vw, 3.4rem); font-weight: 800; line-height: 1; letter-spacing: -0.055em; }
.egs-pitch h1 em { color: var(--egs-orange); font-style: normal; }
.egs-pitch > p { max-width: 580px; margin: 0 0 1.4rem; color: var(--egs-muted); font-size: 1rem; line-height: 1.6; }
.egs-pitch__points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; margin: 0; padding: 0; list-style: none; }
.egs-pitch__points li { display: flex; flex-direction: column; gap: 0.6rem; padding: 1rem; border-radius: 18px; background: #fff; box-shadow: var(--egs-shadow); }
.egs-pitch__points i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #fff0e5; color: var(--egs-orange); }
.egs-pitch__points strong { display: block; font-size: 0.9rem; }
.egs-pitch__points span { color: var(--egs-muted); font-size: 0.78rem; line-height: 1.45; }

@media (max-width: 1099.98px) {
  .egs-radar, .egs-planner, .egs-detail { grid-template-columns: 1fr; }
  .egs-planner__side { position: static; }
}

@media (max-width: 767.98px) {
  .egs { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
  .egs-main { padding-top: 0.75rem; }
  .egs-nav { display: none; }
  .egs-mobile-dock { position: fixed; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom)); left: 10px; z-index: 2030; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: end; min-height: 68px; padding: 7px; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; background: rgba(14,17,22,.96); box-shadow: 0 16px 40px rgba(0,0,0,.3); backdrop-filter: blur(18px); }
  .egs-mobile-dock a { display: flex; min-width: 0; min-height: 54px; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: 8px; color: rgba(255,255,255,.62)!important; font-size: 10px; font-weight: 700; text-decoration: none; }
  .egs-mobile-dock a i { font-size: 18px; }.egs-mobile-dock a.is-active{background:rgba(255,255,255,.1);color:#fff!important}
  .egs-mobile-dock__primary { margin-top: -17px; background: var(--egs-orange)!important; color: #fff!important; box-shadow: 0 9px 22px rgba(255,106,0,.42); }
  .egs-nav__brand div { display: none; }
  .egs-nav__links a { padding: 0.55rem 0.7rem; }
  .egs-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .egs-kpi strong { font-size: 1.4rem; }
  .egs-map { height: 280px; }
  .egs-depots { grid-template-columns: 1fr; }
  .egs-stock li { grid-template-columns: 96px 1fr 50px; }
  .egs-grid { grid-template-columns: 1fr; }
  .egs-span-2 { grid-column: auto; }
  .egs-line { grid-template-columns: 1fr 1fr; }
  .egs-line__product { grid-column: 1 / -1; }
  .egs-line__remove { position: absolute; right: 8px; top: 8px; }
  .egs-line { position: relative; }
  .egs-line__pick { padding-right: 2.4rem; }
  .egs-row { flex-wrap: wrap; }
  .egs-row__driver { flex: 1 1 auto; order: 3; margin-left: 3.2rem; }
  .egs-pitch__points { grid-template-columns: 1fr; }
  .egs-card__head--row .egs-card__tools { width: 100%; }
  .egs-card__tools .egs-btn { flex: 1 1 0; }
  .egs input, .egs select, .egs textarea { font-size: 16px !important; }
  .egs-toolbar .egs-segment { width: 100%; overflow-x: auto; }
  .egs-toolbar .egs-select { flex: 1 1 100%; }
  .egs-head { align-items: stretch; margin-bottom: 1rem; }.egs-head__actions{display:grid;grid-template-columns:1fr 1fr;width:100%}.egs-head__actions .egs-btn{padding:0 .7rem;font-size:.78rem}
  .egs-radar { margin-bottom: 1rem; }.egs-map { height: 260px; }
  .egs-depot { padding: 0.9rem; border-radius: 8px; }.egs-depot__head{margin-bottom:.7rem}.egs-depot__id h3{white-space:normal}
  .egs-depot__foot { align-items:flex-end;flex-direction:column }.egs-depot__contact{width:100%}.egs-depot__actions{width:100%;justify-content:flex-start}.egs-depot__actions .egs-btn{flex:1 1 auto;padding:0 .65rem}
  .egs-iconbtn { width:44px;height:44px;border-radius:8px }
}

@media (prefers-reduced-motion: reduce) { .egs * { animation: none !important; transition: none !important; } }
