/* ════════════════════════════════════════════════════════════════════
   COLIXO — Portail client · Accueil · Direction V1 (composition initiale)
   Uniquement chargé par client-dashboard-premium.html.
   100 % frontend. Pas de logique métier. client-premium.css intact.
   Principe : on reprend l'architecture du dashboard initial (grande
   expédition + KPI frais à droite + tableau récent) sans surfaces brunes
   dans le contenu, avec un suivi compact et une alerte facture.
   ════════════════════════════════════════════════════════════════════ */

/* ── Sidebar : à peine plus large (lisibilité des libellés longs) ── */
body.client-premium.client-hub-home {
  --hub-sidebar-w: 17rem;
}

/* ── Sidebar : espacement des regroupements (PRINCIPAL/DOCUMENTS/...) ── */
body.client-premium.client-hub-home .sidebar__nav .sidebar__section-label {
  margin-top: 1.15rem;
}

/* ── Header : CTA principal « + Nouvelle expédition » (blanc homogène) ── */
body.client-premium.client-hub-home .portal-chrome__cta {
  display: inline-block;
  padding: .55rem 1.05rem;
  border-radius: var(--cx-radius-md);
  background: var(--cx-brand, #a96d40);
  color: #fff !important;
  font-weight: 800;
  font-size: .9rem;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: filter .15s ease;
}
body.client-premium.client-hub-home .portal-chrome__cta:hover {
  color: #fff !important;
  filter: brightness(1.07);
}
body.client-premium.client-hub-home .portal-chrome__cta:focus-visible {
  outline: 2px solid var(--cx-brand, #a96d40);
  outline-offset: 2px;
}
body.client-premium.client-hub-home .portal-chrome__greeting {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
@media (max-width: 640px) {
  body.client-premium.client-hub-home .portal-chrome__cta {
    font-size: .8rem;
    padding: .5rem .8rem;
  }
  body.client-premium.client-hub-home .portal-chrome__lang {
    display: none;
  }
}

/* ── Fond & structure : page continue (pas d'encadré noir, pas de boîte centrée) ──
   Le contenu occupe toute la surface : sidebar + surface de travail contiguë.
   Fond ivoire UNIFORME (body + zone de travail) pour supprimer tout dégradé
   sombre/orangé au-dessus (visible sur Safari) et tout cadre autour du contenu. */
body.client-premium.client-hub-home {
  margin: 0;
  background-color: #f4f0ea;
}
body.client-premium.client-hub-home .portal-main,
body.client-premium.client-hub-home .portal-stage {
  background: #f4f0ea;
}
body.client-premium.client-hub-home .portal-layout,
body.client-premium.client-swiss-shell .portal-layout {
  max-width: none;
  width: 100%;
  margin: 0;
}

/* ── Contenu principal : surface de travail large et fluide ──
   Aucune largeur maximale : le contenu occupe TOUT l'espace après la sidebar.
   Pas de petit conteneur central ni de zone vide à droite. */
body.client-premium.client-hub-home .portal-main .page-content {
  width: 100%;
  max-width: none;
  padding-top: 1.5rem;
  padding-left: clamp(1rem, 2.5vw, 2rem);
  padding-right: clamp(1rem, 2.5vw, 2rem);
}
@media (max-width: 900px) {
  body.client-premium.client-hub-home .portal-main .page-content {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* ── Coquille du hub : rythme vertical aéré ── */
body.client-premium.client-hub-home .v1t-shell {
  display: grid;
  gap: 1.5rem;
  min-width: 0;
}

/* ── Périmètre / succursale (discret, non brun) ── */
body.client-premium.client-hub-home .v1t-meta {
  display: grid;
  gap: .35rem;
  min-width: 0;
}

/* ── TITRE + RECHERCHE sur la même ligne ── */
body.client-premium.client-hub-home .v1t-toprow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem 1.5rem;
  min-width: 0;
}
body.client-premium.client-hub-home .v1t-toprow__title {
  display: grid;
  gap: .25rem;
  min-width: 0;
}
body.client-premium.client-hub-home .v1t-toprow__title-text {
  margin: 0;
  color: var(--cx-text, #211914);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.1;
}
body.client-premium.client-hub-home .v1t-toprow__subtitle {
  margin: 0;
  color: var(--cx-text-muted, #4f453e);
  font-size: .95rem;
}
body.client-premium.client-hub-home .v1t-toprow .hub-quick-track__form--compact {
  display: flex;
  gap: .6rem;
  min-width: 0;
}
body.client-premium.client-hub-home .v1t-toprow .hub-quick-track__input {
  flex: 1 1 auto;
  width: min(24rem, 26vw);
  min-height: 2.7rem;
  padding: .6rem .9rem;
  font-size: .92rem;
  border-color: var(--cx-border-strong, #cdb9a8);
}
body.client-premium.client-hub-home .v1t-toprow .hub-quick-track__btn {
  flex: 0 0 auto;
  min-height: 2.7rem;
  padding: .6rem 1.15rem;
  font-size: .9rem;
}
body.client-premium.client-hub-home .v1t-toprow__result {
  grid-column: 1 / -1;
  margin-top: .2rem;
}
@media (max-width: 900px) {
  body.client-premium.client-hub-home .v1t-toprow {
    grid-template-columns: 1fr;
    gap: .8rem;
  }
  body.client-premium.client-hub-home .v1t-toprow .hub-quick-track__input {
    width: 100%;
  }
}

/* ── SUIVI DES ENVOIS : moteur compact, une zone ── */
body.client-premium.client-hub-home .v1t-track {
  display: grid;
  grid-template-columns: minmax(8rem, .32fr) minmax(0, 1fr);
  align-items: center;
  gap: .4rem 1.2rem;
  min-width: 0;
  padding: .9rem 1.1rem;
  border: 1px solid var(--cx-border, #dfd3c8);
  border-radius: 1rem;
  background: var(--cx-surface-card, #fffdf9);
  box-shadow: 0 2px 8px rgb(55 37 26 / 4%);
}
body.client-premium.client-hub-home .v1t-track__title {
  margin: 0;
  color: var(--cx-text, #211914);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -.01em;
}
body.client-premium.client-hub-home .v1t-track .hub-quick-track__form {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  gap: .6rem;
  min-width: 0;
}
body.client-premium.client-hub-home .v1t-track .hub-quick-track__input {
  flex: 1 1 auto;
  min-height: 2.7rem;
  padding: .6rem .9rem;
  font-size: .95rem;
  border-color: var(--cx-border-strong, #cdb9a8);
}
body.client-premium.client-hub-home .v1t-track .hub-quick-track__btn {
  flex: 0 0 auto;
  min-height: 2.7rem;
  padding: .6rem 1.25rem;
  font-size: .9rem;
}
body.client-premium.client-hub-home .v1t-track .hub-quick-track__result {
  grid-column: 1 / 3;
  margin-top: .1rem;
}
@media (max-width: 640px) {
  body.client-premium.client-hub-home .v1t-track {
    grid-template-columns: 1fr;
    gap: .6rem;
  }
  body.client-premium.client-hub-home .v1t-track .hub-quick-track__form {
    grid-column: 1;
    grid-row: auto;
  }
}

/* ── ACTIONS REQUISES : zone dédiée (titre + vraies anomalies) ── */
body.client-premium.client-hub-home .v1t-alert {
  display: grid;
  gap: .6rem;
  margin-top: .5rem;
  min-width: 0;
}
body.client-premium.client-hub-home .v1t-alert__title {
  margin: 0;
  color: var(--cx-text-muted, #6b5b50);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
body.client-premium.client-hub-home .v1t-alert .hub-urgent {
  min-width: 0;
}
body.client-premium.client-hub-home .v1t-alert .hub-urgent:empty {
  display: none;
}
body.client-premium.client-hub-home .v1t-alert .hub-action-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .55rem;
}
body.client-premium.client-hub-home .v1t-alert .hub-action-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1.1rem;
  min-width: 0;
  padding: .8rem 1rem;
  border: 1px solid var(--cx-danger, #b3392c);
  border-radius: .85rem;
  background: var(--cx-danger-bg, #fbeae7);
}
body.client-premium.client-hub-home .v1t-alert .hub-action-item__body {
  flex: 1 1 auto;
  min-width: 12rem;
}
body.client-premium.client-hub-home .v1t-alert .hub-action-item__title {
  margin: 0;
  color: var(--cx-text, #211914);
  font-weight: 800;
}
body.client-premium.client-hub-home .v1t-alert .hub-action-item__hint {
  margin: .15rem 0 0;
  color: var(--cx-text-muted, #4f453e);
  font-size: .85rem;
}
body.client-premium.client-hub-home .v1t-alert .hub-action-item .hub-btn--ghost {
  flex: 0 0 auto;
}

/* ── GRANDE EXPÉDITION + KPI (KPI à droite) ──
   Expédition ~65 %, KPI ~35 %. */
body.client-premium.client-hub-home .v1t-hero-row {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
  gap: 1.35rem;
  align-items: stretch;
  min-width: 0;
}
body.client-premium.client-hub-home .v1t-hero {
  display: grid;
  align-content: start;
  gap: .9rem;
  min-width: 0;
  padding: 1.15rem 1.3rem;
  border: 1px solid var(--cx-border, #dfd3c8);
  border-radius: 1.15rem;
  background: var(--cx-surface-card, #fffdf9);
  box-shadow: 0 2px 10px rgb(55 37 26 / 5%);
}
body.client-premium.client-hub-home .v1t-hero .hub-route-card {
  height: auto;
  gap: .4rem;
}
body.client-premium.client-hub-home .v1t-hero .hub-route-card__eyebrow {
  color: var(--cx-brand, #9c6037);
  font-size: .8rem;
}
body.client-premium.client-hub-home .v1t-hero .hub-route-card__ref {
  color: var(--cx-text, #211914);
  font-size: clamp(1.3rem, 1.7vw, 1.55rem);
}
body.client-premium.client-hub-home .v1t-hero .hub-route-card__hint {
  color: var(--cx-text-muted, #4f453e);
  font-size: 1rem;
}
body.client-premium.client-hub-home .v1t-hero .hub-route-map {
  min-height: 4.5rem;
  border-color: rgb(255 255 255 / 10%);
  background: linear-gradient(rgb(255 255 255 / 3%) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / 3%) 1px, transparent 1px), #2c1f19;
}
/* Tracé continu : du point de départ au reste du parcours, sans coupure. */
body.client-premium.client-hub-home .v1t-hero .hub-route-map__road {
  stroke-dasharray: none;
  stroke-width: 3px;
}
body.client-premium.client-hub-home .v1t-hero .hub-route-map__point strong {
  font-size: .8rem;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}
body.client-premium.client-hub-home .v1t-hero .hub-route-card__step::before {
  background: rgb(33 25 20 / 14%);
}
body.client-premium.client-hub-home .v1t-hero .hub-route-card__step.is-done::before {
  background: var(--cx-brand, #9c6037);
}
body.client-premium.client-hub-home .v1t-hero .hub-route-card__step-dot {
  border-color: rgb(33 25 20 / 22%);
  background: #fff;
}
body.client-premium.client-hub-home .v1t-hero .hub-route-card__step.is-done .hub-route-card__step-dot {
  border-color: var(--cx-brand, #9c6037);
  background: var(--cx-brand, #9c6037);
}
body.client-premium.client-hub-home .v1t-hero .hub-route-card__step.is-current .hub-route-card__step-dot {
  border-color: var(--cx-brand, #9c6037);
  box-shadow: 0 0 0 3px rgb(169 109 64 / 22%);
}
body.client-premium.client-hub-home .v1t-hero .hub-route-card__step-label {
  color: var(--cx-text, #211914);
  font-size: .82rem;
}
body.client-premium.client-hub-home .v1t-hero .hub-route-card__step:not(.is-done):not(.is-current) .hub-route-card__step-label {
  color: var(--cx-text-muted, #6b5b50);
}
body.client-premium.client-hub-home .v1t-hero .hub-route-card__facts {
  border-top-color: #ece2d8;
}
body.client-premium.client-hub-home .v1t-hero .hub-route-card__fact dt {
  color: var(--cx-text-muted, #6b5b50);
  font-size: .72rem;
}
body.client-premium.client-hub-home .v1t-hero .hub-route-card__fact dd {
  color: var(--cx-text, #211914);
  font-size: 1rem;
}
body.client-premium.client-hub-home .v1t-hero .hub-route-card__actions {
  justify-content: flex-start;
}
body.client-premium.client-hub-home .v1t-hero .hub-route-card__actions .hub-btn--primary {
  min-height: 2.4rem;
  padding: .55rem 1.2rem;
  font-size: .9rem;
}

/* KPI : grille 2 × 2 à droite de l'expédition. Chiffre dominant, libellé secondaire. */
body.client-premium.client-hub-home .v1t-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: stretch;
  gap: .8rem;
  min-width: 0;
}
body.client-premium.client-hub-home .v1t-kpi {
  display: grid;
  align-content: center;
  gap: .15rem;
  padding: .75rem .95rem;
  border: 1px solid var(--cx-border, #dfd3c8);
  border-radius: .95rem;
  background: #fff;
  box-shadow: 0 1px 6px rgb(55 37 26 / 4%);
}
body.client-premium.client-hub-home .v1t-kpi__value {
  color: var(--cx-text, #211914);
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
body.client-premium.client-hub-home .v1t-kpi__value#kpi-amount {
  font-size: 1.3rem;
  white-space: nowrap;
}
body.client-premium.client-hub-home .v1t-kpi__label {
  color: var(--cx-text-muted, #4f453e);
  font-size: .85rem;
  font-weight: 700;
  line-height: 1.3;
}

/* ── RÉCENTS : tableau horizontal unique ── */
body.client-premium.client-hub-home .v1t-recent {
  display: grid;
  gap: .6rem;
  min-width: 0;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--cx-border, #dfd3c8);
  border-radius: 1.1rem;
  background: var(--cx-surface-card, #fffdf9);
  box-shadow: 0 2px 8px rgb(55 37 26 / 4%);
}
body.client-premium.client-hub-home .v1t-recent__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
body.client-premium.client-hub-home .v1t-recent__head .hub-card__title {
  margin: 0;
  color: var(--cx-text, #211914);
  font-size: 1rem;
}
/* En-tête du tableau * Expéditions récentes * : 6 colonnes */
body.client-premium.client-hub-home .v1t-recent__head-row,
body.client-premium.client-hub-home .v1t-recent__row {
  display: grid;
  grid-template-columns: minmax(7rem, .9fr) minmax(8rem, 1.1fr) 4.5rem 4rem 8rem minmax(9rem, 1.3fr);
  gap: .6rem;
  align-items: center;
  min-width: 0;
}
body.client-premium.client-hub-home .v1t-recent__head-row {
  padding: 0 0 .6rem;
  border-bottom: 2px solid #e4d6c9;
  color: var(--cx-text, #211914);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}
body.client-premium.client-hub-home .v1t-recent__rows {
  display: grid;
}
body.client-premium.client-hub-home .v1t-recent__row {
  padding: .9rem .35rem;
  border-bottom: 1px solid #eee4da;
  color: var(--cx-text, #211914);
  font-size: .92rem;
  text-decoration: none;
}
body.client-premium.client-hub-home .v1t-recent__row:last-child {
  border-bottom: none;
}
body.client-premium.client-hub-home .v1t-recent__row:hover {
  background: rgb(169 109 64 / 6%);
  border-radius: .5rem;
}
body.client-premium.client-hub-home .v1t-recent__ref {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}
body.client-premium.client-hub-home .v1t-recent__dest {
  color: var(--cx-text-muted, #4f453e);
}
body.client-premium.client-hub-home .v1t-recent__delivery {
  color: var(--cx-brand, #9c6037);
  font-weight: 700;
}
@media (max-width: 900px) {
  body.client-premium.client-hub-home .v1t-recent__head-row {
    display: none;
  }
  body.client-premium.client-hub-home .v1t-recent__row {
    grid-template-columns: 1fr 1fr;
    gap: .15rem .7rem;
  }
  body.client-premium.client-hub-home .v1t-recent__row > *:nth-child(2),
  body.client-premium.client-hub-home .v1t-recent__row > *:nth-child(4),
  body.client-premium.client-hub-home .v1t-recent__row > *:nth-child(6) {
    text-align: right;
  }
}

/* ── Alertes data (chargement / accès) ── */
body.client-premium.client-hub-home .v1t-alert-area {
  min-width: 0;
}

/* ── ACTIONS RAPIDES : pied discret ── */
body.client-premium.client-hub-home .v1t-actions {
  display: grid;
  gap: .6rem;
  min-width: 0;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--cx-border, #dfd3c8);
  border-radius: 1.1rem;
  background: var(--cx-surface-card, #fffdf9);
  box-shadow: 0 2px 8px rgb(55 37 26 / 4%);
}
body.client-premium.client-hub-home .v1t-actions__head .hub-card__title {
  margin: 0;
  color: var(--cx-text, #211914);
  font-size: 1rem;
}
body.client-premium.client-hub-home .v1t-actions__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .5rem 1rem;
}
body.client-premium.client-hub-home .v1t-actions__link {
  color: var(--cx-brand, #9c6037);
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
  padding: .35rem 0;
}
body.client-premium.client-hub-home .v1t-actions__link:hover {
  text-decoration: underline;
}
@media (max-width: 900px) {
  body.client-premium.client-hub-home .v1t-actions__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  body.client-premium.client-hub-home .v1t-actions__grid {
    grid-template-columns: 1fr;
  }
}

/* ── Responsive : tout s'empile au-dessous de 900px ── */
@media (max-width: 900px) {
  body.client-premium.client-hub-home .v1t-hero-row {
    grid-template-columns: 1fr;
  }
  body.client-premium.client-hub-home .v1t-hero {
    padding: 1.2rem 1.1rem;
  }
}
@media (max-width: 480px) {
  body.client-premium.client-hub-home .v1t-kpis {
    grid-template-columns: 1fr;
  }
}

body.client-premium.client-hub-home .v1t-hero .hub-route-card__step-date { display: none; }

/* Note honnête : progression, pas un GPS temps réel. */
body.client-premium.client-hub-home .v1t-hero .v1t-progress-note {
  margin: 0 0 .1rem;
  color: var(--cx-text-muted, #6b5b50);
  font-size: .74rem;
  line-height: 1.35;
}

/* densité : marge/padding des étapes et des faits réduits */
body.client-premium.client-hub-home .v1t-hero .hub-route-card__steps { margin-top: 0; padding-top: .25rem; }
body.client-premium.client-hub-home .v1t-hero .hub-route-card__facts { padding-top: .4rem; margin-top: .2rem; }

body.client-premium.client-hub-home .portal-chrome__actions { margin-left: auto; }

/* Petite marge à gauche du logo Colixo (tous écrans) */
body.client-premium.client-hub-home .sidebar__brand { padding-left: .35rem; }
