/*
 * Finitions visuelles communes à Tilivo.
 * Cette feuille reste volontairement sobre pour conserver un aspect métier.
 */

/* Les anciennes cartes à bande colorée deviennent des blocs métier sobres. */
.tab-card,
.stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: none;
}

.display-launch-actions{display:grid;grid-template-columns:repeat(3,minmax(210px,1fr));gap:14px;margin-top:18px}.display-action{position:relative;display:grid;grid-template-columns:48px minmax(0,1fr);gap:13px;align-items:center;min-height:84px;padding:15px 42px 15px 15px;border:1px solid transparent;border-radius:17px;line-height:1.2;text-align:left;text-decoration:none;overflow:hidden;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}.display-action::after{content:"›";position:absolute;right:17px;top:50%;transform:translateY(-53%);font-size:29px;font-weight:400;opacity:.7}.display-action:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(9,34,53,.14)}.display-action-icon{width:48px;height:48px;display:grid;place-items:center;border-radius:14px;font-size:22px;font-weight:850}.display-action strong,.display-action small{display:block}.display-action strong{font-size:16px;font-weight:800}.display-action small{margin-top:5px;font-size:12px;font-weight:600;opacity:.72}.display-action.manage{background:linear-gradient(135deg,var(--blue),#087e9b);color:#fff;box-shadow:0 7px 18px rgba(9,85,165,.2)}.display-action.manage .display-action-icon{background:rgba(255,255,255,.17);color:#fff}.display-action.open{border-color:#d1dee7;background:linear-gradient(145deg,#fff,#edf4f8);color:var(--dark)}.display-action.open .display-action-icon{background:#dcecf7;color:var(--blue)}.display-action.open:hover{border-color:#9dbed4}@media(max-width:1050px){.display-launch-actions{grid-template-columns:1fr 1fr}.display-action.manage{grid-column:1/-1}}@media(max-width:700px){.display-launch-actions{grid-template-columns:1fr}.display-action.manage{grid-column:auto}}

.tab-card {
  padding: 16px;
  border-left: 1px solid var(--border);
}

/* Synthèses chiffrées : une seule barre, sans accumulation de cartes. */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0;
  margin: 14px 0 20px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.stats .stat {
  min-width: 0;
  padding: 16px 18px;
  background: transparent;
  border: 0;
  border-left: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
}

/* Le chiffre d'affaires du jour suit le même langage visuel. */
.sales-main-card {
  padding: 18px 20px;
  background: #fff;
  color: var(--dark);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: none;
}

.sales-main-card span,
.sales-main-card small {
  color: #64748b;
}

.sales-main-card strong {
  color: var(--blue);
}

.stats .stat:first-child {
  border-left: 0;
}

.stats .stat span {
  display: block;
  margin-bottom: 7px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.stats .stat strong {
  display: block;
  margin: 0;
  color: var(--dark);
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 750;
  line-height: 1.1;
}

/* En-tête compact sur mobile. */
.mobile-menu-toggle {
  display: none;
}

/* Le bloc identité doit pouvoir se réduire sans pousser la navigation hors écran. */
#app > header .brand {
  min-width: 0;
  flex: 1 1 auto;
}

#app > header .brand > div {
  min-width: 0;
}

#app > header .brand strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app > header nav {
  flex: 0 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

/* Sur tablette, le menu complet ne doit jamais recouvrir le sélecteur de point de vente. */
@media (min-width: 801px) and (max-width: 1450px) {
  #app > header {
    height: auto;
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
    padding: max(8px, env(safe-area-inset-top)) 12px 7px;
    z-index: 30;
  }
  #app > header .brand { width: 100%; }
  #app > header .mobile-menu-toggle {
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    min-height: 44px;
    margin-left: auto;
    padding: 0;
    background: var(--blue);
    color: #fff;
    font-size: 25px;
    line-height: 1;
  }
  #app > header nav {
    display: none !important;
    position: static !important;
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start !important;
    padding: 4px 0 2px !important;
    border-top: 1px solid var(--border);
    background: #fff;
  }
  #app > header.menu-open nav { display: flex !important; }
  #app > header nav button { flex: 0 0 auto; }
}

@media (max-width: 800px) {
  #app > header {
    height: auto;
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
    padding: max(8px, env(safe-area-inset-top)) 10px 6px;
    z-index: 30;
  }

  .brand {
    width: 100%;
  }

  .brand > div {
    min-width: 0;
  }

  .mobile-menu-toggle {
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    min-height: 44px;
    margin-left: auto;
    padding: 0;
    background: var(--blue);
    color: #fff;
    font-size: 25px;
    line-height: 1;
  }

  #app > header nav {
    display: none !important;
    position: static !important;
    inset: auto !important;
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start !important;
    padding: 4px 0 2px !important;
    border-top: 1px solid var(--border);
    background: #fff;
  }

  #app > header.menu-open nav {
    display: flex !important;
  }

  #app > header nav button {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 0 10px;
    font-size: 12px;
  }

  main {
    padding: 10px !important;
  }

  .cart {
    bottom: env(safe-area-inset-bottom, 0) !important;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats .stat {
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 430px) {
  .stats {
    grid-template-columns: 1fr;
  }

  .stats .stat {
    border-left: 0;
  }
}
