:root {
  --vert: #2D4636;
  --creme: #FDF5E6;
  --terre: #B5654D;
  --blanc: #ffffff;
  --texte: #1a1a1a;
  --ombre: rgba(45, 70, 54, 0.12);
  --rayon: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --livr-fluo-jaune: #F5D000;
  --livr-fluo-orange: #F06A20;
  --livr-fluo-vert: #3CB82A;
  color-scheme: light only;
  background-color: #FDF5E6;
}

* { box-sizing: border-box; }

html {
  color-scheme: light only;
  background-color: #FDF5E6;
  background-image: linear-gradient(#FDF5E6, #FDF5E6);
}

body {
  margin: 0;
  font-family: var(--font);
  background-color: #FDF5E6;
  color: var(--texte);
  line-height: 1.5;
  min-height: 100vh;
}

.bandeau-env-test {
  position: sticky;
  top: 0;
  z-index: 10060;
  background: #B5654D;
  color: #fff;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.45rem 0.75rem;
}

@media (prefers-color-scheme: dark) {
  :root,
  html,
  body,
  .layout-admin,
  .contenu-principal,
  .page-caisse,
  .zone-produits,
  .page-employe,
  .page-login {
    color-scheme: light only;
    background-color: #FDF5E6;
  }
}

a { color: var(--vert); }

.page-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
  background-color: #FDF5E6;
}

.login-card {
  background: var(--blanc);
  border-radius: var(--rayon);
  box-shadow: 0 8px 32px var(--ombre);
  padding: 2rem;
  width: min(400px, 100%);
  text-align: center;
}

.login-card h1 {
  margin: 0 0 0.25rem;
  color: var(--vert);
  font-size: 1.75rem;
}

.login-card .sous-titre {
  color: #666;
  margin-bottom: 1.5rem;
}

.login-card form {
  text-align: left;
}

.form-group { margin-bottom: 1rem; }

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--vert);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="hidden"]),
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 2px solid #e0d8c8;
  border-radius: 8px;
  font-size: 1rem;
  background: var(--blanc);
}

input[type="checkbox"],
input[type="radio"] {
  width: 1.25rem;
  height: 1.25rem;
  min-width: 1.25rem;
  min-height: 1.25rem;
  max-width: 1.25rem;
  max-height: 1.25rem;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  accent-color: #2D4636;
  flex: 0 0 auto;
  flex-shrink: 0;
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 2;
  -webkit-appearance: checkbox;
  appearance: auto;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="hidden"]):focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--vert);
}

.btn,
button.btn,
a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  opacity: 1;
  visibility: visible;
  -webkit-appearance: none;
  appearance: none;
}

.btn-principal {
  background-color: #2D4636;
  color: #FDF5E6;
  border: 2px solid #2D4636;
}

.login-card .btn-principal,
.page-login .btn-principal {
  width: 100%;
}

.btn-principal:hover {
  background-color: #3a5a47;
  border-color: #3a5a47;
}

.btn-secondaire {
  background-color: #ffffff;
  color: #2D4636;
  border: 2px solid #2D4636;
}

.btn-secondaire:hover {
  background-color: #FDF5E6;
}

.btn-terre {
  background-color: #B5654D;
  color: #ffffff;
  border: 2px solid #B5654D;
}

.btn-danger {
  background-color: #8b3a3a;
  color: #ffffff;
  border: 2px solid #8b3a3a;
}

.form-inline .btn,
.tableau .btn {
  width: auto;
  flex: 0 0 auto;
}

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.875rem; }

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.alert-erreur {
  background: #fde8e8;
  color: #7f1d1d;
  border: 1px solid #f5c2c2;
}

.alert-succes {
  background: #e8f5e9;
  color: #1b4332;
  border: 1px solid #b7dfc9;
}

/* Notifications flottantes — ne décalent pas le contenu */
.alerte-toast {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 1000;
  width: min(360px, calc(100vw - 2rem));
  pointer-events: none;
}

.alerte-toast:empty {
  display: none;
}

.alerte-toast .alert {
  margin: 0;
  pointer-events: auto;
  box-shadow: 0 4px 20px rgba(45, 70, 54, 0.18);
}

.layout-admin {
  min-height: 100vh;
  background-color: #FDF5E6;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  height: 100vh;
  height: 100dvh;
  z-index: 90;
  background: var(--vert);
  color: var(--creme);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid rgba(253, 245, 230, 0.2);
}

.logo-app {
  display: block;
  object-fit: contain;
  border-radius: 12px;
}

.logo-app-login {
  width: 7.5rem;
  height: 7.5rem;
  margin: 0 auto 0.85rem;
}

.logo-app-sidebar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 10px;
  flex-shrink: 0;
  background: rgba(253, 245, 230, 0.12);
}

.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.sidebar a {
  display: block;
  padding: 0.65rem 1.25rem;
  color: var(--creme);
  text-decoration: none;
}

.sidebar a:hover,
.sidebar a.active {
  background: rgba(253, 245, 230, 0.15);
}

.sidebar-logout {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.85rem 0;
  padding-bottom: max(0.85rem, env(safe-area-inset-bottom));
  color: rgba(253, 245, 230, 0.85);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  border-top: none;
  background: transparent;
  z-index: 2;
}

.sidebar-pied {
  border-top: 1px solid rgba(253, 245, 230, 0.2);
  padding: 0.65rem 0.85rem 0;
  background: var(--vert);
}

.sidebar-logout:hover {
  background: rgba(253, 245, 230, 0.12);
  color: var(--creme);
}

.contenu-principal {
  margin-left: 220px;
  padding: 1.5rem 2rem;
  overflow-x: auto;
  overflow-y: auto;
  background-color: #FDF5E6;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

.contenu-principal h1 {
  margin: 0 0 1.25rem;
  color: var(--vert);
}

.cartes-grille {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.carte {
  background: var(--blanc);
  border-radius: var(--rayon);
  padding: 1.25rem;
  box-shadow: 0 2px 12px var(--ombre);
}

.carte .valeur {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--vert);
}

.carte .libelle {
  color: #666;
  font-size: 0.9rem;
}

.stats-periodes-rapides {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.stats-periodes-rapides .btn.is-actif {
  background: var(--vert);
  color: var(--creme);
  border-color: var(--vert);
}

.top-produits-periodes {
  display: flex;
  gap: 0.5rem;
  margin: 0 0 0.65rem;
}

.top-produits-periodes .btn {
  flex: 1;
}

.top-produits-periodes .btn.is-actif {
  background: var(--vert);
  color: var(--creme);
  border-color: var(--vert);
}

.top-produits-resume {
  margin: 0 0 0.65rem;
  color: #555;
  font-size: 0.9rem;
  font-weight: 600;
}

.modal-top-produits {
  width: min(420px, 100%);
  max-height: min(90vh, 100dvh);
  padding: 1rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-top-produits h3 {
  margin: 0 0 0.65rem;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.liste-top-produits {
  overflow: auto;
  flex: 1;
  min-height: 0;
  max-height: min(55vh, 100dvh);
}

#modal-historique-fermer {
  display: block;
  width: 100%;
  margin-top: 0.85rem;
  flex-shrink: 0;
}

.top-produits-liste {
  list-style: none;
  margin: 0;
  padding: 0;
}

.top-produits-ligne {
  display: grid;
  grid-template-columns: 1.75rem minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.35rem 0.45rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(45, 70, 54, 0.1);
  font-size: 0.9rem;
  line-height: 1.2;
}

.top-produits-ligne:last-child {
  border-bottom: none;
}

.top-produits-ligne .rang-medaille,
.top-produits-ligne .rang-num {
  min-width: 1.55rem;
  height: 1.55rem;
  font-size: 0.75rem;
}

.top-produits-nom {
  min-width: 0;
  font-weight: 600;
  color: var(--vert);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-produits-qte {
  color: #666;
  font-size: 0.82rem;
  white-space: nowrap;
  text-align: right;
}

.top-produits-ca {
  font-weight: 700;
  color: var(--texte);
  white-space: nowrap;
  text-align: right;
  min-width: 4.25rem;
}

.stats-filtres-barre {
  display: flex;
  align-items: center;
  margin: 0 0 0.75rem;
}

.stats-filtres-leaderboard {
  margin-bottom: 1.25rem;
}

.stats-filtres-leaderboard.is-replie,
.stats-filtres-leaderboard[hidden] {
  display: none !important;
}

.stats-filtres-leaderboard .form-group-checkbox {
  display: flex;
  align-items: flex-end;
}

.stats-filtres-cachees {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-self: flex-end;
}

.stats-filtres-cachees-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--vert);
}

.stats-filtres-cachees-boutons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.stats-filtres-cachees-boutons .btn.is-actif {
  background: var(--vert);
  color: var(--creme);
  border-color: var(--vert);
}

.label-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
  min-height: 2.75rem;
}

.titre-section-stats {
  margin: 0 0 0.35rem;
  color: var(--vert);
  font-size: 1.15rem;
}

.leaderboard-conteneur {
  margin-top: 0.5rem;
}

.tableau-leaderboard .col-rang {
  width: 3rem;
  text-align: center;
}

.tableau tbody td.col-rang::before {
  display: none !important;
  content: none !important;
}

.tableau tbody td.col-rang {
  justify-content: flex-start;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
  background: transparent;
}

.rang-medaille,
.rang-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
}

.rang-or {
  background: #f0c419;
  color: #5c4a00;
}

.rang-argent {
  background: #c0c0c0;
  color: #333;
}

.rang-bronze {
  background: #cd7f32;
  color: #fff;
}

.rang-num {
  background: rgba(45, 70, 54, 0.1);
  color: var(--vert);
}

.leaderboard-produit {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 10rem;
}

.leaderboard-image {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.leaderboard-image-placeholder {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(45, 70, 54, 0.08);
  border-radius: 6px;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.leaderboard-produit-infos strong {
  display: block;
  line-height: 1.25;
}

.leaderboard-produit-infos small {
  color: #666;
  font-size: 0.8rem;
}

.badge-categorie-stats {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(45, 70, 54, 0.1);
  color: var(--vert);
  white-space: nowrap;
}

.leaderboard-part-ca {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 7rem;
}

.leaderboard-part-ca span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--vert);
  white-space: nowrap;
}

.leaderboard-barre {
  flex: 1;
  height: 6px;
  max-width: 4rem;
  background: var(--terre);
  border-radius: 999px;
}

.leaderboard-chargement,
.leaderboard-vide {
  text-align: center;
  color: #666;
  padding: 2rem 1rem !important;
}


.tableau {
  width: 100%;
  border-collapse: collapse;
  background: var(--blanc);
  border-radius: var(--rayon);
  overflow: hidden;
  box-shadow: 0 2px 12px var(--ombre);
}

.tableau th,
.tableau td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid #eee;
  position: relative;
}

.tableau th {
  background: var(--vert);
  color: var(--creme);
  font-weight: 600;
}

.tableau tr:last-child td { border-bottom: none; }

.badge-admin {
  display: inline-block;
  background: var(--terre);
  color: var(--blanc);
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
}

.motif-admin-historique {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--terre);
  font-style: italic;
  line-height: 1.35;
}

.page-employe {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem;
  background-color: #FDF5E6;
  min-height: 100vh;
}

.carte-pointage {
  background: var(--blanc, #fff);
  border: 2px solid rgba(45, 70, 54, 0.14);
  border-radius: var(--rayon);
  overflow: hidden;
  margin-bottom: 1rem;
}

.carte-pointage-date {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(45, 70, 54, 0.12);
  background: rgba(45, 70, 54, 0.04);
}

.carte-pointage-date-label {
  font-weight: 700;
  color: var(--vert);
  font-size: 0.9rem;
}

.choix-date {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.btn-date {
  margin: 0;
  padding: 0.7rem 0.5rem;
  min-height: 48px;
  border: 2px solid rgba(45, 70, 54, 0.2);
  border-radius: 8px;
  background: #fff;
  color: var(--vert);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.btn-date.is-actif {
  background: var(--vert);
  border-color: var(--vert);
  color: var(--creme, #FDF5E6);
}

.btn-date:active:not(.is-actif) {
  background: rgba(45, 70, 54, 0.06);
}

.carte-pointage-horaires {
  display: flex;
  flex-direction: column;
}

.plage-horaire {
  padding: 0.85rem 1rem 0.95rem;
}

.plage-horaire + .plage-horaire {
  border-top: 1px solid rgba(45, 70, 54, 0.12);
}

.plage-horaire-champs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.plage-horaire-entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.plage-horaire-titre {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--vert);
}

.btn-retirer-plage {
  margin: 0;
  padding: 0.15rem 0.45rem;
  min-height: 28px;
  border: 1px solid rgba(181, 101, 77, 0.35);
  border-radius: 6px;
  background: rgba(181, 101, 77, 0.08);
  color: var(--terre);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
}

.btn-retirer-plage:hover {
  background: rgba(181, 101, 77, 0.16);
}

.carte-pointage-ajouter {
  display: flex;
  justify-content: center;
  padding: 0 1rem 0.85rem;
}

.btn-ajouter-plage {
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 0.35rem 0.75rem;
  border: 2px dashed rgba(45, 70, 54, 0.28);
  border-radius: 8px;
  background: rgba(45, 70, 54, 0.03);
  color: var(--vert);
  font-family: inherit;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.btn-ajouter-plage:hover,
.btn-ajouter-plage:focus-visible {
  background: rgba(45, 70, 54, 0.08);
  border-color: var(--vert);
  outline: none;
}

.champ-time {
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.champ-time-label {
  display: block;
  margin: 0 0 0.2rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #666;
}

.btn-heure {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.55rem 0.35rem;
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
  border: 2px solid rgba(45, 70, 54, 0.18);
  border-radius: 8px;
  background: #fff;
  color: var(--texte);
  min-height: 48px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.btn-heure:hover:not(:disabled),
.btn-heure:focus-visible {
  border-color: var(--vert);
  outline: none;
}

.btn-heure:active:not(:disabled) {
  background: rgba(45, 70, 54, 0.06);
}

.btn-heure:disabled {
  background: #f0f0f0;
  color: #999;
  cursor: not-allowed;
}

.modal-horloge {
  max-width: 340px;
  width: calc(100% - 1.5rem);
  text-align: center;
}

.modal-horloge h3 {
  margin: 0 0 0.35rem;
  color: var(--vert);
}

.modal-horloge .aide-champ {
  margin: 0 0 0.75rem;
}

.modal-horloge .selecteur-heure {
  margin-bottom: 1rem;
}

#modal-horloge.modal-overlay.is-open {
  z-index: 120;
}

.carte-pointage-total {
  padding: 0.7rem 1rem;
  border-top: 1px solid rgba(45, 70, 54, 0.12);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--terre);
  background: rgba(181, 101, 77, 0.06);
}

.form-pointage .form-actions {
  margin-top: 0;
}

.liste-historique-heures {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.nav-mois-heures {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0 0.5rem;
  padding: 0.55rem 0.65rem;
  background: rgba(45, 70, 54, 0.06);
  border-radius: var(--rayon);
}

.btn-nav-mois {
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.btn-nav-mois:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.nav-mois-centre {
  flex: 1;
  min-width: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
}

.nav-mois-centre strong {
  color: var(--vert);
  font-size: 1.05rem;
  line-height: 1.2;
}

.nav-mois-plage {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--texte);
  line-height: 1.2;
}

.nav-mois-centre .total-mois-heures {
  font-size: 0.95rem;
  line-height: 1.2;
  font-weight: 700;
  color: var(--terre);
}

.jours-mois-heures {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.separateur-semaine-heures {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0.55rem 0 0.15rem;
  padding: 0.35rem 0.15rem 0.4rem;
  border-bottom: 2px solid rgba(45, 70, 54, 0.22);
  color: var(--vert);
}

.bloc-semaine-mois-heures:first-child .separateur-semaine-heures {
  margin-top: 0;
}

.separateur-semaine-gauche {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
  min-width: 0;
}

.separateur-semaine-titre {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.separateur-semaine-plage {
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(45, 70, 54, 0.7);
  white-space: nowrap;
}

.separateur-semaine-total {
  flex-shrink: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--terre);
  white-space: nowrap;
}

.jours-semaine-mois-heures {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.bloc-semaine-mois-heures + .bloc-semaine-mois-heures {
  margin-top: 0.35rem;
}

.nav-semaine-heures {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0 0.5rem;
  padding: 0.55rem 0.65rem;
  background: rgba(45, 70, 54, 0.06);
  border-radius: var(--rayon);
}

.btn-nav-semaine {
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.btn-nav-semaine:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.nav-semaine-centre {
  flex: 1;
  min-width: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
}

.nav-semaine-centre strong {
  color: var(--vert);
  font-size: 1.05rem;
  line-height: 1.2;
}

.nav-semaine-plage {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--texte);
  line-height: 1.2;
}

.nav-semaine-centre .total-semaine-heures {
  font-size: 0.95rem;
  line-height: 1.2;
}

.bloc-semaine-heures {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.entete-semaine-heures {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0.15rem;
}

.entete-semaine-heures h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--vert);
}

.total-semaine-heures {
  font-weight: 700;
  color: var(--terre);
  white-space: nowrap;
}

.jours-semaine-heures {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.ligne-jour-heures {
  background: var(--blanc, #fff);
  border: 2px solid rgba(45, 70, 54, 0.12);
  border-radius: var(--rayon);
  padding: 0.65rem 0.75rem;
}

.ligne-jour-heures.is-dimanche,
.ligne-jour-heures.is-ferie {
  background: rgba(181, 101, 77, 0.1);
  border-color: rgba(181, 101, 77, 0.35);
}

.ligne-jour-heures.is-dimanche .carte-heure-date,
.ligne-jour-heures.is-dimanche .tag-jour-special,
.ligne-jour-heures.is-ferie .carte-heure-date,
.ligne-jour-heures.is-ferie .tag-jour-special {
  color: var(--terre);
}

.ligne-jour-heures.is-highlight {
  box-shadow: 0 0 0 3px rgba(181, 101, 77, 0.25);
}

.ligne-jour-resume {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ligne-jour-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1;
  min-width: 0;
}

.ligne-jour-info .carte-heure-date {
  font-size: 0.95rem;
}

.ligne-jour-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.detail-jour-heures {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(45, 70, 54, 0.12);
}

.carte-heure.is-dimanche,
.carte-heure.is-ferie {
  background: rgba(181, 101, 77, 0.1);
  border-color: rgba(181, 101, 77, 0.35);
}

.tag-jour-special {
  display: inline-block;
  margin-left: 0.45rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  vertical-align: middle;
  background: rgba(181, 101, 77, 0.2);
  color: var(--terre);
}


.carte-heure {
  background: var(--blanc);
  border: 2px solid rgba(45, 70, 54, 0.12);
  border-radius: var(--rayon);
  padding: 0.85rem 1rem;
}

.carte-heure.is-verrouille {
  opacity: 0.85;
}

.carte-heure-entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.carte-heure-date {
  color: var(--vert);
  font-size: 1.05rem;
}

.carte-heure-duree {
  font-weight: 700;
  color: var(--terre);
  white-space: nowrap;
}

.carte-heure-plages {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0 0 0.55rem;
}

.carte-heure-ligne {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.carte-heure-periode {
  font-weight: 600;
  color: var(--vert);
  min-width: 5.5rem;
}

.carte-heure-plage {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  font-weight: 600;
  color: var(--texte);
}

.carte-heure-fleche {
  color: #888;
  font-weight: 500;
}

.carte-heure-badge {
  margin-bottom: 0.55rem;
}

.carte-heure-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.carte-heure-actions-seul {
  grid-template-columns: 1fr;
}

.carte-heure-actions .btn {
  width: 100%;
  min-height: 44px;
}

.badge-demande-envoyee {
  margin: 0.35rem 0 0;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  background: rgba(181, 101, 77, 0.12);
  color: var(--terre);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

.modal-demande-modif {
  max-width: 420px;
  width: calc(100% - 1.5rem);
}

.modal-demande-modif textarea {
  width: 100%;
  min-height: 7rem;
  resize: vertical;
}

#modal-demande-modif.modal-overlay.is-open {
  z-index: 120;
}

.liste-demandes-heures {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1rem;
}

.carte-demande {
  background: var(--blanc, #fff);
  border: 2px solid rgba(45, 70, 54, 0.12);
  border-radius: var(--rayon);
  padding: 1rem 1.1rem;
}

.carte-demande.statut-en_attente {
  border-color: rgba(181, 101, 77, 0.45);
}

.carte-demande-entete {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.carte-demande-entete strong {
  color: var(--vert);
  margin-right: 0.5rem;
}

.carte-demande-entete time {
  font-weight: 700;
  color: var(--texte);
  white-space: nowrap;
}

.carte-demande-meta {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
  color: #666;
}

.carte-demande-message {
  margin: 0 0 0.85rem;
  padding: 0.75rem 0.85rem;
  background: rgba(45, 70, 54, 0.05);
  border-radius: 8px;
  white-space: pre-wrap;
  line-height: 1.45;
}

.carte-demande-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.carte-demande-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.carte-demande-qui {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.carte-demande-date-cible {
  font-weight: 700;
  color: var(--texte);
  white-space: nowrap;
}

.compteur-filtre {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.2rem;
  margin-left: 0.25rem;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  background: rgba(45, 70, 54, 0.12);
  font-size: 0.75rem;
  font-weight: 700;
}

.stats-periodes-rapides .btn.is-actif .compteur-filtre {
  background: rgba(253, 245, 230, 0.35);
}

.modal-traiter-demande {
  max-width: 420px;
  width: calc(100% - 1.5rem);
}

.modal-traiter-demande textarea {
  width: 100%;
  resize: vertical;
}

#modal-traiter-demande.modal-overlay.is-open {
  z-index: 120;
}

.badge-statut {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  vertical-align: middle;
}

.badge-statut-en_attente {
  background: rgba(181, 101, 77, 0.18);
  color: var(--terre);
}

.badge-statut-traitee {
  background: rgba(45, 70, 54, 0.12);
  color: var(--vert);
}

.badge-statut-refusee {
  background: rgba(139, 58, 58, 0.12);
  color: #8b3a3a;
}

.entete-simple {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.entete-simple h1 {
  margin: 0;
  color: var(--vert);
}

.panneau {
  background: var(--blanc);
  border-radius: var(--rayon);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 12px var(--ombre);
}

.panneau h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  color: var(--vert);
}

.selecteur-heure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}

.horloge-picker {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.horloge-periodes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  width: 100%;
  max-width: 240px;
}

.horloge-periode {
  padding: 0.45rem 0.6rem;
  border: 2px solid var(--vert);
  border-radius: 8px;
  background: var(--blanc);
  color: var(--vert);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.horloge-periode.is-actif {
  background: var(--vert);
  color: var(--creme);
}

.horloge-affichage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.horloge-digit {
  min-width: 4.5rem;
  padding: 0.55rem 0.75rem;
  border: none;
  border-radius: 12px;
  background: rgba(45, 70, 54, 0.08);
  color: var(--vert);
  font-family: inherit;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.horloge-digit.is-actif {
  background: rgba(181, 101, 77, 0.22);
  color: var(--terre);
  box-shadow: inset 0 0 0 2px var(--terre);
}

.horloge-sep {
  font-size: 2rem;
  font-weight: 700;
  color: var(--vert);
}

.horloge-face {
  width: min(240px, 78vw);
  aspect-ratio: 1;
  touch-action: none;
  user-select: none;
}

.horloge-disque {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(45, 70, 54, 0.06);
  border: 2px solid rgba(45, 70, 54, 0.12);
}

.horloge-aiguille {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.horloge-pivot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--terre);
  z-index: 3;
}

.horloge-bras {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: var(--longueur, 80px);
  margin-left: -1px;
  margin-top: calc(var(--longueur, 80px) * -1);
  background: var(--terre);
  transform-origin: bottom center;
  transform: rotate(var(--angle, 0deg));
  z-index: 2;
}

.horloge-pointe {
  position: absolute;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border-radius: 50%;
  background: var(--terre);
  z-index: 4;
}

.horloge-num {
  position: absolute;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--texte);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.horloge-num.is-actif {
  color: #fff;
  background: transparent;
  z-index: 6;
}

.horloge-num-heure {
  font-variant-numeric: tabular-nums;
}

.horloge-num-ext {
  width: 2rem;
  height: 2rem;
  margin: -1rem 0 0 -1rem;
  font-size: 0.85rem;
}

.horloge-num-int {
  width: 1.65rem;
  height: 1.65rem;
  margin: -0.825rem 0 0 -0.825rem;
  font-size: 0.72rem;
  color: rgba(45, 70, 54, 0.8);
}

.horloge-num-int.is-actif {
  color: #fff;
}

.horloge-disque-24h .horloge-num-heure {
  /* tailles gérées par .horloge-num-ext / .horloge-num-int */
}

.badge-admin-inline {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.35rem;
  font-size: 0.65rem;
  font-weight: 650;
  border-radius: 4px;
  background: rgba(181, 101, 77, 0.15);
  color: var(--terre);
  vertical-align: middle;
}

.label-invisible {
  visibility: hidden;
  height: 1.2em;
  margin-bottom: 0.35rem;
}

.page-admin-heures .barre-outils-heures {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  background: var(--blanc, #fff);
  border-radius: var(--rayon);
  box-shadow: 0 2px 12px var(--ombre);
}

.liste-leaderboard-heures {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.ligne-classement-heures {
  display: grid;
  grid-template-columns: 2.25rem 1fr auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.65rem 0.85rem;
  background: var(--blanc, #fff);
  border: 2px solid rgba(45, 70, 54, 0.12);
  border-radius: var(--rayon);
  cursor: pointer;
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ligne-classement-heures:hover {
  border-color: rgba(45, 70, 54, 0.35);
  box-shadow: 0 2px 10px var(--ombre);
}

.ligne-classement-heures.is-actif {
  border-color: var(--vert);
  box-shadow: 0 0 0 2px rgba(45, 70, 54, 0.15);
}

.ligne-classement-heures-rang {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--vert);
  text-align: center;
}

.ligne-classement-heures:nth-child(1) .ligne-classement-heures-rang { color: #b8860b; }
.ligne-classement-heures:nth-child(2) .ligne-classement-heures-rang { color: #6b7280; }
.ligne-classement-heures:nth-child(3) .ligne-classement-heures-rang { color: #b5654d; }

.ligne-classement-heures-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.ligne-classement-heures-info strong {
  color: var(--vert);
}

.ligne-classement-heures-info span {
  font-size: 0.8rem;
  color: #666;
}

.ligne-classement-heures-total {
  font-weight: 700;
  color: var(--terre);
  white-space: nowrap;
}

#panneau-leaderboard-heures {
  margin-bottom: 0;
}

.heures-admin-colonnes {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.heures-admin-colonne-droite {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

@media (min-width: 960px) {
  .heures-admin-colonnes {
    display: grid;
    grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
  }

  #panneau-leaderboard-heures {
    position: sticky;
    top: 0.75rem;
    max-height: calc(100vh - 1.5rem);
    overflow: auto;
  }
}

@media (max-width: 900px) {
  .ligne-classement-heures {
    grid-template-columns: 1.75rem 1fr auto;
    gap: 0.4rem;
    padding: 0.4rem 0.55rem;
    border-width: 1px;
  }

  .ligne-classement-heures-rang {
    font-size: 0.9rem;
  }

  .ligne-classement-heures-info strong {
    font-size: 0.88rem;
  }

  .ligne-classement-heures-info span {
    font-size: 0.72rem;
  }

  .ligne-classement-heures-total {
    font-size: 0.85rem;
  }

  .liste-leaderboard-heures {
    gap: 0.3rem;
    margin-top: 0.45rem;
  }

  .ligne-jour-heures {
    padding: 0.45rem 0.55rem;
    border-width: 1px;
  }

  .ligne-jour-info .carte-heure-date {
    font-size: 0.88rem;
  }

  .detail-jour-heures {
    margin-top: 0.4rem;
    padding-top: 0.4rem;
  }

  .carte-heure-ligne {
    gap: 0.25rem;
  }

  .nav-mois-heures,
  .nav-semaine-heures {
    gap: 0.35rem;
    margin-bottom: 0.5rem;
  }

  .btn-nav-mois,
  .btn-nav-semaine {
    min-width: 2.25rem;
    padding: 0.35rem 0.45rem;
  }

  .contenu-principal {
    padding: 0.85rem 0.75rem 1.25rem;
  }

  .panneau {
    padding: 0.85rem;
    margin-bottom: 0.85rem;
  }

  .filtres,
  .barre-filtres-tri,
  .stats-periodes-rapides {
    gap: 0.4rem;
    margin-bottom: 0.75rem;
  }

  .cartes-grille {
    gap: 0.45rem;
    margin-bottom: 0.85rem;
  }

  .carte {
    padding: 0.7rem 0.75rem;
  }

  .carte .valeur {
    font-size: 1.25rem;
  }

  .carte .libelle {
    font-size: 0.78rem;
  }
}

.page-admin-heures .barre-outils-heures-employe {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
}

.export-heures-plage {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem;
}

.export-heures-plage .form-group {
  margin: 0;
}

.export-heures-plage input[type="date"] {
  min-width: 9.5rem;
}

.form-group-export-btn .label-invisible {
  visibility: hidden;
  display: block;
  height: 0;
  margin: 0;
  overflow: hidden;
}

.form-group-export-btn .btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

.form-group-taux-horaire {
  margin: 0;
  min-width: 8.5rem;
}

.form-group-taux-horaire input {
  width: 7.5rem;
  max-width: 100%;
  pointer-events: auto;
  cursor: text;
}

.form-group-employe-principal {
  margin: 0;
  flex: 1;
  min-width: 12rem;
  max-width: 24rem;
}

.filtres-heures-compacts {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem;
}

.filtres-heures-compacts .form-group {
  margin: 0;
  min-width: 8rem;
}

.entete-section-heures {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.entete-section-heures h2 {
  margin: 0;
}

.form-group-tri-inline {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.form-group-tri-inline label {
  margin: 0;
  white-space: nowrap;
}

.entete-page-boutons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.carte-heure-admin.is-highlight {
  border-color: var(--terre);
  box-shadow: 0 0 0 3px rgba(181, 101, 77, 0.25);
}

.modal-creneau-admin {
  max-width: 420px;
  width: calc(100% - 1.5rem);
}

.modal-creneau-admin .carte-pointage-admin {
  margin: 0.75rem 0;
}

.modal-creneau-admin .form-group-motif {
  margin-top: 0.5rem;
}

#modal-creneau-admin.modal-overlay.is-open {
  z-index: 120;
}

#modal-horloge-admin.modal-overlay.is-open {
  z-index: 130;
}

.liste-heures-admin {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.bloc-employe-heures {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.entete-employe-heures {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.15rem 0.1rem;
}

.entete-employe-heures h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--vert);
}

.total-employe-heures {
  font-weight: 700;
  color: var(--terre);
}

.jours-employe-heures {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.creneaux-jour-admin {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.ligne-creneau-admin {
  padding: 0.55rem 0;
  border-top: 1px solid rgba(45, 70, 54, 0.1);
}

.ligne-creneau-admin:first-child {
  border-top: none;
  padding-top: 0;
}

.ligne-creneau-plage {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
}

.ligne-creneau-duree {
  margin-left: auto;
  color: var(--terre);
  font-weight: 700;
}

.ligne-synthese-cliquable {
  cursor: pointer;
}

.ligne-synthese-cliquable:hover {
  background: rgba(45, 70, 54, 0.06);
}

.tableau-compact th,
.tableau-compact td {
  padding: 0.45rem 0.65rem;
}

.page-caisse {
  display: grid;
  grid-template-columns: 1fr 340px;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background-color: #FDF5E6;
}

.page-caisse.caisse-onglet-commandes {
  grid-template-columns: 1fr;
}

.onglets-caisse-principal {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.onglet-caisse {
  flex: 1;
  max-width: 12rem;
  padding: 0.55rem 1rem;
  border: 2px solid var(--vert);
  border-radius: 999px;
  background: var(--blanc);
  color: var(--vert);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.onglet-caisse.is-actif {
  background: var(--vert);
  color: var(--creme);
}

.onglet-caisse-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  margin-left: 0.35rem;
  border-radius: 999px;
  background: var(--terre);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}

.onglet-caisse.is-actif .onglet-caisse-badge {
  background: var(--creme);
  color: var(--vert);
}

.onglet-caisse-badge[hidden] {
  display: none !important;
}

.btn-avec-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.badge-notif {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--terre);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}

.badge-notif[hidden] {
  display: none !important;
}

.badge-notif-sidebar {
  margin-left: 0.35rem;
}

.sidebar a .badge-notif-sidebar {
  vertical-align: middle;
}

.entete-page-actions h1 .badge-notif {
  margin-left: 0.45rem;
  vertical-align: middle;
}

.onglets-employe {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.onglet-employe {
  display: inline-block;
  padding: 0.55rem 1rem;
  border: 2px solid var(--vert);
  border-radius: 999px;
  background: var(--blanc);
  color: var(--vert);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.onglet-employe.is-actif {
  background: var(--vert);
  color: var(--creme);
}

.page-compte-caisse {
  max-width: 32rem;
  margin: 0 auto;
  padding: 1rem 1.25rem 2rem;
}

.sous-titre-compte {
  margin: 0 0 1.25rem;
  color: #555;
}

.panneau-compte {
  max-width: 28rem;
}

.panneau-compte-deconnexion {
  margin-top: 1.25rem;
}

.panneau-compte-deconnexion .btn-danger {
  display: inline-flex;
}

.form-compte .btn-principal {
  margin-top: 0.5rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.barre-recherche-produits {
  margin-bottom: 0.85rem;
}

.input-recherche-produits {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 2px solid rgba(45, 70, 54, 0.25);
  border-radius: var(--rayon);
  font-family: inherit;
  font-size: 1rem;
  background: var(--blanc);
  color: #333;
}

.input-recherche-produits:focus {
  outline: none;
  border-color: var(--vert);
}

body.caisse-mode-commandes #panier,
body.caisse-mode-commandes .barre-mobile-caisse,
body.caisse-modal-commande-open #panier,
body.caisse-modal-commande-open .barre-mobile-caisse {
  display: none !important;
}

/* Patch : commandes toujours au-dessus du fond beige / panier */
#zone-vente-caisse[hidden],
#zone-commandes-caisse[hidden],
#panier[hidden],
.panier[hidden],
.barre-mobile-caisse[hidden],
.panier-backdrop[hidden] {
  display: none !important;
}

body.caisse-mode-commandes #zone-commandes-caisse,
body.caisse-mode-commandes .liste-commandes-caisse {
  position: relative;
  z-index: 80;
}

body.caisse-mode-commandes .carte-commande {
  position: relative;
  z-index: 81;
  background: #ffffff;
}

#modal-commande.modal-overlay.is-open {
  z-index: 500 !important;
}

#modal-produits-commande.modal-overlay.is-open {
  z-index: 510 !important;
}

body.caisse-modal-produits-open #modal-produits-commande.modal-overlay.is-open {
  z-index: 515 !important;
}

#modal-poids-commande.modal-overlay.is-open,
#modal-poids.modal-overlay.is-open {
  z-index: 520 !important;
}

#modal-confirmer-vente.modal-overlay.is-open {
  z-index: 540 !important;
}

#modal-commande.modal-overlay.is-open .modal,
#modal-produits-commande.modal-overlay.is-open .modal,
#modal-poids-commande.modal-overlay.is-open .modal {
  position: relative;
  z-index: 1;
  background: #ffffff;
}

.catalogue-commande-inline {
  max-height: min(36vh, 280px);
  overflow-y: auto;
  margin-bottom: 1rem;
  padding: 0.5rem;
  border: 1px solid rgba(45, 70, 54, 0.12);
  border-radius: 8px;
  background: #faf8f4;
}

.grille-produits-compact {
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem;
}

.grille-produits-compact .btn-produit {
  min-height: 96px;
  font-size: 0.85rem;
}

.grille-produits-compact .btn-produit .produit-image {
  width: 48px;
  height: 48px;
}

.commande-articles-titre {
  margin: 0;
  font-size: 1rem;
  color: var(--vert);
}

.commande-articles-entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 1rem 0 0.5rem;
  flex-wrap: wrap;
}

.catalogue-commande-modal {
  max-height: min(50vh, 360px);
  overflow-y: auto;
}

.entete-commandes-caisse {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.liste-commandes-caisse {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.carte-commande {
  background: var(--blanc);
  border: 2px solid rgba(45, 70, 54, 0.15);
  border-radius: var(--rayon);
  padding: 1rem 1.1rem;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.carte-commande:hover {
  border-color: var(--vert);
  box-shadow: 0 2px 12px var(--ombre);
}

.carte-commande-entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.carte-commande-client {
  font-size: 1.1rem;
  color: var(--vert);
}

.badge-commande-attente {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(181, 101, 77, 0.15);
  color: var(--terre);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.carte-commande-retrait {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: #444;
}

.carte-commande-tel {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.carte-commande-tel a,
a.numero-tel,
.numero-tel a {
  color: var(--vert);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.numero-tel {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.carte-commande-lignes {
  margin: 0 0 0.65rem;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  color: #555;
}

.carte-commande-total {
  margin: 0 0 0.75rem;
  font-weight: 700;
  color: var(--terre);
}

.carte-commande-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.modal-commande .commande-articles-titre {
  margin: 0;
}

.commande-lignes {
  max-height: min(40vh, 320px);
  overflow-y: auto;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(45, 70, 54, 0.12);
  border-radius: 8px;
  padding: 0.5rem;
  background: #faf8f4;
  color: #333;
}

.commande-lignes .ligne-panier {
  border-bottom-color: rgba(45, 70, 54, 0.12);
}

.commande-lignes .ligne-panier-nom {
  color: var(--vert);
}

.commande-lignes .ligne-panier-detail {
  color: #666;
  opacity: 1;
}

.commande-lignes .quantite-panier {
  color: var(--vert);
}

.commande-lignes .quantite-controles .btn-qte,
.commande-lignes .ligne-panier .btn-retirer,
.commande-lignes .ligne-panier .btn-total-ligne {
  background: var(--blanc);
  border: 1px solid var(--vert);
  color: var(--vert);
}

.commande-lignes .quantite-controles .btn-qte:hover,
.commande-lignes .ligne-panier .btn-retirer:hover,
.commande-lignes .ligne-panier .btn-total-ligne:hover {
  background: rgba(45, 70, 54, 0.08);
}

.commande-lignes .ligne-panier.is-custom .btn-total-ligne {
  border-color: var(--terre);
  color: var(--terre);
  background: rgba(196, 112, 75, 0.12);
}

.commande-lignes .panier-vide {
  color: #666;
}

.commande-total-form {
  margin: 0 0 1rem;
  font-size: 1.05rem;
}

.modal-actions-commande {
  flex-wrap: wrap;
}

.modal-actions-commande .btn {
  flex: 1 1 auto;
  min-width: 8rem;
}

.zone-produits {
  padding: 1rem;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  background-color: #FDF5E6;
}

@media (max-width: 900px) {
  .page-caisse { grid-template-columns: 1fr; }
}

.zone-produits h2 {
  color: var(--vert);
  margin: 1rem 0 0.75rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bloc-categorie:first-child h2 {
  margin-top: 0;
}

.catalogue-vide {
  color: #666;
  padding: 2rem 1rem;
  text-align: center;
}

.aide-catalogue-caisse {
  margin: 0 0 1rem;
  color: #666;
  font-size: 0.95rem;
}

.grille-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.85rem;
}

.btn-categorie {
  background: var(--blanc);
  border: 2px solid var(--vert);
  border-radius: var(--rayon);
  padding: 1.25rem 1rem;
  min-height: 110px;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-align: center;
}

.btn-categorie .categorie-nom {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--vert);
  line-height: 1.25;
}

.btn-categorie .categorie-compte {
  font-size: 0.85rem;
  color: var(--terre);
  font-weight: 500;
}

.btn-categorie .categorie-image {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.25rem;
}

.btn-categorie.a-image {
  padding-top: 0.85rem;
}

.ligne-actions-image {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.entete-categorie-caisse {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.titre-categorie-caisse {
  margin: 0;
  font-size: 1.25rem;
  color: var(--vert);
  flex: 1;
  min-width: 0;
}

.grille-produits {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.btn-produit {
  background: var(--blanc);
  border: 2px solid var(--vert);
  border-radius: var(--rayon);
  padding: 0.5rem;
  min-height: 120px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--vert);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-align: center;
}

.btn-produit .produit-image {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.btn-produit .produit-nom {
  line-height: 1.2;
}

.btn-produit .prix {
  display: block;
  font-size: 0.9rem;
  color: var(--terre);
  font-weight: 500;
}

/* Admin — page produits (liste + panneau détail) */
.contenu-produits .entete-produits {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.contenu-produits .entete-produits h1 {
  margin: 0;
}

.entete-page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.entete-page-actions h1 {
  margin: 0;
}

.entete-produits-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}

.entete-produits-actions .form-group {
  margin: 0;
}

.layout-produits {
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(360px, 38%);
  gap: 1.25rem;
  align-items: start;
}

.liste-produits {
  min-width: 0;
}

/* Le overflow du contenu principal bloque le sticky viewport : on le lève sur cette page (PC). */
@media (min-width: 1101px) {
  .contenu-principal.contenu-produits {
    overflow-y: visible;
  }
}

.panneau-detail-produit {
  background: var(--blanc);
  border-radius: var(--rayon);
  padding: 1.25rem;
  box-shadow: 0 2px 12px var(--ombre);
  position: sticky;
  top: 1.5rem;
  align-self: start;
  max-height: calc(100vh - 3rem);
  max-height: calc(100dvh - 3rem);
  overflow-y: auto;
  z-index: 2;
}

.detail-vide {
  color: #666;
  text-align: center;
  padding: 2.5rem 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.form-produit-detail h2 {
  margin: 0 0 1.25rem;
  font-size: 1.15rem;
  color: var(--vert);
  word-break: break-word;
}

.form-produit-detail .form-group {
  margin-bottom: 1rem;
}

.ligne-categorie {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.ligne-categorie select {
  flex: 1;
  min-width: 0;
}

.ligne-categorie .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.bloc-image-produit {
  margin-bottom: 1.25rem;
}

.apercu-image-produit {
  margin-bottom: 0.75rem;
}

.zone-image-produit {
  border: 2px dashed rgba(45, 70, 54, 0.28);
  border-radius: var(--rayon);
  padding: 0.75rem;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--creme);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  overflow: hidden;
  position: relative;
}

.zone-image-produit:hover,
.zone-image-produit:focus,
.zone-image-produit.drag-over {
  border-color: var(--vert);
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(45, 70, 54, 0.12);
}

.zone-image-produit.a-image {
  padding: 0.5rem;
  min-height: 280px;
  background: #fff;
}

.zone-image-placeholder {
  text-align: center;
  padding: 1.5rem 1rem;
  color: #888;
  pointer-events: none;
}

.zone-image-placeholder p {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

.zone-image-icone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 2px dashed rgba(45, 70, 54, 0.35);
  font-size: 1.75rem;
  font-weight: 300;
  color: var(--vert);
  line-height: 1;
}

.zone-image-produit img {
  display: block;
  width: 100%;
  max-height: 360px;
  min-height: 200px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}

.apercu-image-info {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: #666;
  word-break: break-word;
}

.bloc-image-produit > .btn {
  width: 100%;
}

.aide-champ {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  opacity: 0.75;
}

.actions-detail-produit {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

.actions-detail-produit .btn {
  width: 100%;
}

.tableau tbody tr[data-id] {
  cursor: pointer;
}

.tableau tbody tr.ligne-selectionnee {
  background: rgba(45, 70, 54, 0.08);
}

.tableau tbody tr.ligne-selectionnee td {
  border-bottom-color: rgba(45, 70, 54, 0.12);
}

.cell-image-produit {
  width: 56px;
}

.thumb-produit {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.sans-image {
  opacity: 0.4;
}

@media (max-width: 1100px) {
  .layout-produits {
    grid-template-columns: 1fr;
  }

  .panneau-detail-produit {
    position: static;
    max-height: none;
  }
}

.panier {
  background: var(--vert);
  color: var(--creme);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.panier h2 { margin: 0 0 1rem; }

.lignes-panier {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1rem;
}

.panier-entete,
.total-panier,
.panier .btn-encaisser,
.panier .btn-panier-secondaire,
.bandeau-edition-vente {
  flex-shrink: 0;
}

.ligne-panier {
  display: block;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(253, 245, 230, 0.2);
}

.ligne-panier-nom {
  display: block;
  line-height: 1.25;
  margin-bottom: 0.2rem;
}

.ligne-panier-detail {
  display: block;
  opacity: 0.85;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}

.ligne-panier-barre {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.ligne-panier-infos {
  min-width: 0;
  flex: 1;
}

.ligne-panier-infos small {
  opacity: 0.85;
}

.ligne-panier .actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.quantite-controles {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex: 0 0 auto;
  flex-shrink: 0;
  max-width: 55%;
}

.quantite-controles .btn-qte,
.ligne-panier .btn-retirer,
.ligne-panier .btn-total-ligne {
  background: transparent;
  border: 1px solid var(--creme);
  color: var(--creme);
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
}

.quantite-controles .btn-qte {
  min-width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  line-height: 1;
  font-size: 1.15rem;
  font-weight: 600;
  flex: 0 0 auto;
}

.quantite-controles .btn-qte:hover,
.ligne-panier .btn-retirer:hover,
.ligne-panier .btn-total-ligne:hover {
  background: rgba(253, 245, 230, 0.15);
}

.quantite-panier {
  min-width: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0.2rem 0.35rem;
  border-radius: 6px;
  font-family: inherit;
  color: inherit;
  flex: 0 0 auto;
}

.quantite-panier:hover {
  background: rgba(45, 70, 54, 0.08);
}

/* Spécificité > règle globale input { width: 100% } */
.quantite-controles .quantite-panier-input,
.ligne-panier .quantite-panier-input {
  width: 3.75rem;
  max-width: 3.75rem;
  min-width: 3rem;
  flex: 0 0 3.75rem;
  box-sizing: border-box;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.25rem 0.2rem;
  margin: 0;
  border: 2px solid var(--creme);
  border-radius: 6px;
  font-family: inherit;
  background: #fff;
  color: var(--texte);
}

.btn-total-ligne {
  flex: 1 1 auto;
  min-width: 4.5rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ligne-panier.is-custom .btn-total-ligne {
  border-color: var(--terre);
  color: #FDF5E6;
  background: rgba(196, 112, 75, 0.25);
}

.ligne-panier .btn-retirer {
  padding: 0.2rem 0.5rem;
  font-size: 1.1rem;
  line-height: 1;
  flex: 0 0 auto;
}

.total-panier {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0.75rem 0;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.modal-overlay.is-open {
  display: flex;
}

.modal {
  background: var(--blanc);
  border-radius: var(--rayon);
  padding: 1.5rem;
  width: min(400px, 100%);
}

.modal h3 { margin-top: 0; color: var(--vert); }

.modal-dialogue-overlay {
  z-index: 10050;
}

.modal.modal-dialogue {
  width: min(420px, 100%);
  box-shadow: 0 12px 40px rgba(45, 70, 54, 0.22);
}

.modal-dialogue-message {
  margin: 0;
  color: #333;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.modal-actions-unique {
  margin-top: 1.25rem;
}

.modal-actions .btn { flex: 1; }

.btn-modal-action {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.85rem 1.25rem;
  font-size: 1.05rem;
  background-color: #B5654D;
  color: #ffffff;
  border: 2px solid #B5654D;
}

.btn-modal-action:hover {
  background-color: #9a5540;
  border-color: #9a5540;
}

.panier .btn-encaisser {
  width: 100%;
  padding: 0.85rem 1.25rem;
  font-size: 1.1rem;
  background-color: #B5654D;
  color: #ffffff;
  border: 2px solid #B5654D;
}

.panier .btn-encaisser:hover:not(:disabled) {
  background-color: #9a5540;
  border-color: #9a5540;
}

.panier .btn-panier-secondaire {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.65rem 1rem;
  background: transparent;
  color: #FDF5E6;
  border: 2px solid rgba(253, 245, 230, 0.75);
  font-weight: 600;
}

.panier .btn-panier-secondaire:hover:not(:disabled) {
  background: rgba(253, 245, 230, 0.12);
  border-color: #FDF5E6;
}

.panier .btn-panier-secondaire:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.bandeau-edition-vente {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.65rem;
  background: rgba(253, 245, 230, 0.14);
  border: 1px solid rgba(253, 245, 230, 0.45);
  border-radius: 8px;
  color: #FDF5E6;
  font-size: 0.82rem;
  font-weight: 600;
}

.bandeau-edition-vente[hidden] {
  display: none !important;
}

.btn-annuler-edition {
  flex-shrink: 0;
  padding: 0.25rem 0.55rem;
  border: 1px solid rgba(253, 245, 230, 0.7);
  border-radius: 6px;
  background: transparent;
  color: #FDF5E6;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
}

.btn-annuler-edition:hover {
  background: rgba(253, 245, 230, 0.15);
}

.modal-paiement.is-edition-vente .onglet-paiement[data-onglet-paiement="black"] {
  display: none;
}

.option-cachee-discrete {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.65rem;
  font-size: 0.78rem;
  color: #888;
  cursor: pointer;
  user-select: none;
}

.option-cachee-discrete input {
  width: 0.9rem;
  height: 0.9rem;
  margin: 0;
  cursor: pointer;
  opacity: 0.75;
}

.option-cachee-discrete span {
  opacity: 0.85;
}

.entete-ventes-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  align-items: center;
}

.entete-ventes-actions .btn {
  width: auto;
}

#btn-toggle-cachees.is-actif {
  background-color: var(--vert);
  color: var(--creme);
  border-color: var(--vert);
}

.badge-cachee {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0.12rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 600;
  background: #6b5b4f;
  color: #fff;
  border-radius: 4px;
  vertical-align: middle;
}

.ligne-vente-cachee {
  background: rgba(107, 91, 79, 0.08);
}

.badge-commande-vente,
.badge-vente-caisse {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
}

.badge-commande-vente {
  background: rgba(45, 70, 54, 0.12);
  color: var(--vert);
}

.badge-vente-caisse {
  background: rgba(196, 112, 75, 0.12);
  color: var(--terre);
}

.ligne-vente-commande td {
  background: rgba(45, 70, 54, 0.03);
}

/* Détail vente — panneau déroulant */
.actions-vente {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.btn-detail-vente.is-open {
  background-color: var(--vert);
  color: var(--creme);
  border-color: var(--vert);
}

.vente-detail-row td {
  padding: 0 !important;
  background: #fff;
  border-bottom: 2px solid rgba(45, 70, 54, 0.12);
}

/* Empêche le panneau détail d’élargir / compresser les colonnes du tableau */
.tableau-ventes {
  table-layout: fixed;
  width: 100%;
}

.vente-detail-panel {
  padding: 1rem 1.25rem 1.25rem;
  background: #fff;
  color: #1a1a1a;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.vente-detail-infos {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.45rem 1.25rem;
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.4;
}

.vente-detail-infos dt {
  font-weight: 650;
  color: var(--vert);
  margin: 0;
}

.vente-detail-infos dd {
  margin: 0;
  color: #222;
}

.vente-detail-titre-lignes {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--vert);
}

.vente-detail-lignes {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: var(--blanc);
  border: 1px solid rgba(45, 70, 54, 0.12);
  border-radius: 8px;
  overflow: hidden;
}

.vente-detail-lignes th,
.vente-detail-lignes td {
  padding: 0.55rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid rgba(45, 70, 54, 0.1);
  color: #222;
}

.vente-detail-lignes th {
  background: var(--vert);
  color: var(--creme);
  font-weight: 600;
}

.vente-detail-lignes tr:last-child td {
  border-bottom: none;
}

.vente-detail-chargement,
.vente-detail-vide,
.vente-detail-erreur {
  margin: 0;
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  color: #333;
}

.vente-detail-erreur {
  color: #8b3a3a;
}

.tableau-ventes .actions-vente .btn {
  width: auto;
}

.actions-ligne {
  display: flex;
  gap: 0.35rem;
}

.form-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

.form-inline .form-group {
  margin: 0;
  flex: 1;
  min-width: 140px;
}

.form-inline .form-group-checkbox {
  flex: 0 0 auto;
  min-width: auto;
}

.graphique-conteneur {
  background: var(--blanc);
  border-radius: var(--rayon);
  padding: 1rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 12px var(--ombre);
}

.filtres {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
  align-items: flex-end;
}

.filtres .form-group { margin: 0; }

.barre-filtres-tri select {
  min-width: 10rem;
}

.switch-point-vente {
  display: none;
}

.barre-point-vente {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 2px solid var(--vert);
  border-radius: var(--rayon);
  overflow: hidden;
  flex: 1 1 auto;
  min-width: 0;
  gap: 0;
}

.entete-caisse {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  padding: 0 0 1rem;
  margin-bottom: 1rem;
}

.entete-caisse-ligne-titre {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.entete-caisse-ligne-titre h1 {
  margin: 0;
}

.entete-caisse-ligne-outils {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.entete-caisse-barre {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  flex-wrap: nowrap;
  width: auto;
  margin-bottom: 0;
}

.entete-caisse-barre .switch-espace-caisse {
  flex: 0 0 auto;
}

.entete-caisse-barre .barre-point-vente {
  flex: 0 0 auto;
  width: auto;
  min-width: 11rem;
  margin-bottom: 0;
}

.entete-caisse-barre .btn-point-vente-tab {
  flex: none;
  padding: 0.42rem 0.85rem;
  font-size: 0.82rem;
  border: none;
  border-radius: 0;
  border-right: 1px solid rgba(45, 70, 54, 0.12);
}

.entete-caisse-barre .btn-point-vente-tab:last-child {
  border-right: none;
}

.entete-caisse h1 {
  margin: 0;
}

.btn-ventes-jour {
  width: auto;
  white-space: nowrap;
  margin-bottom: 0;
  flex-shrink: 0;
}

.entete-caisse-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 0;
  justify-content: flex-end;
}

.entete-caisse-actions .btn {
  width: auto;
}

.entete-caisse-actions .menu-changer-espace {
  flex-shrink: 0;
}

.btn-point-vente-tab {
  padding: 0.6rem 1rem;
  border: 2px solid var(--vert);
  border-radius: var(--rayon);
  background: var(--blanc);
  color: var(--vert);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn-point-vente-tab:hover:not(.is-actif) {
  background: rgba(45, 70, 54, 0.06);
}

.btn-point-vente-tab.is-actif {
  background: var(--vert);
  color: var(--creme);
}

.switch-espace-caisse {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  min-width: 8.5rem;
  border: 2px solid var(--vert);
  border-radius: var(--rayon);
  overflow: hidden;
  flex-shrink: 0;
}

.switch-espace-option {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.42rem 0.65rem;
  text-align: center;
  text-decoration: none;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--vert);
  background: var(--blanc);
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.switch-espace-option:hover:not(.is-actif) {
  background: rgba(45, 70, 54, 0.06);
}

.switch-espace-option.is-actif {
  background: var(--vert);
  color: var(--creme);
  cursor: default;
}

.menu-changer-espace {
  position: relative;
}

.menu-changer-espace-bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border: 2px solid #2D4636;
  border-radius: 8px;
  background-color: #ffffff;
  color: #2D4636;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  list-style: none;
}

.menu-changer-espace-bouton:hover {
  background-color: #FDF5E6;
}

.menu-changer-espace-bouton::-webkit-details-marker {
  display: none;
}

.menu-changer-espace-bouton::after {
  content: '▾';
  font-size: 0.75rem;
  opacity: 0.75;
}

.menu-changer-espace-titre {
  font-weight: 600;
}

.menu-changer-espace-actif {
  font-weight: 700;
}

.menu-changer-espace-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 40;
  min-width: 9rem;
  padding: 0.35rem;
  border-radius: 10px;
  background: var(--blanc);
  border: 1px solid rgba(45, 70, 54, 0.15);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.menu-changer-espace:not([open]) .menu-changer-espace-panel {
  display: none;
}

.menu-changer-espace-lien {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--vert);
  font-size: 0.88rem;
  font-weight: 600;
}

.menu-changer-espace-lien:hover {
  background: var(--creme);
}

.modal-point-vente {
  text-align: center;
}

.grille-points-vente {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}

.grille-points-vente .btn-point-vente {
  min-height: 4rem;
  font-size: 1.1rem;
}

.points-vente-produit {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.points-vente-produit .label-points {
  font-weight: 600;
  color: var(--vert);
  font-size: 0.9rem;
}

.form-group-checkbox {
  display: flex;
  align-items: flex-end;
  min-height: 42px;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--vert);
  cursor: pointer;
  user-select: none;
  pointer-events: auto;
  position: relative;
  z-index: 2;
}

.checkbox-label input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  min-width: 1.25rem;
  max-width: 1.25rem;
  accent-color: #2D4636;
  cursor: pointer;
  pointer-events: auto;
}

.cell-checkbox {
  text-align: center;
  width: 3.25rem;
  position: relative;
  z-index: 2;
}

.tableau-produits .col-ferme,
.tableau-produits .col-marche {
  width: 3.25rem;
  text-align: center;
  white-space: nowrap;
}

.cell-checkbox input[type="checkbox"] {
  margin: 0;
  vertical-align: middle;
}

.cell-checkbox .cb-actif {
  width: 1.25rem;
  height: 1.25rem;
  min-width: 1.25rem;
  max-width: 1.25rem;
  cursor: pointer;
  pointer-events: auto;
  vertical-align: middle;
}

/* --- Éléments mobile (masqués sur desktop) --- */
.btn-nav-mobile,
.sidebar-overlay,
.barre-mobile-caisse,
.panier-backdrop,
.btn-fermer-panier {
  display: none;
}

.modal-centre {
  text-align: center;
}

.modal-large {
  width: min(700px, 100%);
  max-height: min(90vh, 100dvh);
  overflow: auto;
}

.modal-confirmation-ok {
  width: auto;
  margin-top: 1rem;
}

.panier-vide {
  opacity: 0.7;
}

.panier-entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.panier-entete h2 {
  margin: 0;
}

.tableau-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 0.5rem;
}

.tableau-scroll .tableau {
  min-width: 640px;
}

.form-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.form-actions .btn {
  width: auto;
}

/* --- Responsive mobile-first (téléphone) --- */
@media (max-width: 900px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="hidden"]),
  select,
  textarea {
    font-size: 16px;
  }

  .alerte-toast {
    top: max(0.75rem, env(safe-area-inset-top));
    right: max(0.75rem, env(safe-area-inset-right));
    left: max(0.75rem, env(safe-area-inset-left));
    width: auto;
  }

  .login-card {
    padding: 1.5rem;
  }

  /* Admin — menu latéral */
  .layout-admin {
    min-height: 100vh;
  }

  .contenu-principal {
    margin-left: 0;
    height: auto;
    overflow-y: visible;
    min-height: 100vh;
    padding: 3.75rem 1rem 1.25rem;
    padding-top: calc(3.25rem + env(safe-area-inset-top));
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
  }

  .btn-nav-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: max(0.65rem, env(safe-area-inset-top));
    left: max(0.65rem, env(safe-area-inset-left));
    z-index: 80;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 2px solid var(--vert);
    border-radius: 8px;
    background: var(--blanc);
    color: var(--vert);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 10px var(--ombre);
  }

  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 85;
    background: rgba(0, 0, 0, 0.45);
  }

  .sidebar-overlay[hidden] {
    display: none;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(280px, 88vw);
    height: 100dvh;
    z-index: 90;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
    padding: 0;
    overflow: hidden;
  }

  .sidebar-brand {
    padding-top: max(1.25rem, env(safe-area-inset-top));
  }

  .layout-admin.nav-open .sidebar,
  .layout-livraison.nav-open .sidebar {
    transform: translateX(0);
  }

  .sidebar a {
    padding: 0.85rem 1.25rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  body.nav-mobile-open,
  body.panier-mobile-open {
    overflow: hidden;
  }

  .contenu-principal h1 {
    font-size: 1.35rem;
    margin-bottom: 1rem;
  }

  .filtres,
  .barre-filtres-tri,
  .entete-produits-actions,
  .entete-ventes-actions {
    gap: 0.5rem;
  }

  .filtres .form-group,
  .barre-filtres-tri .form-group {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 0;
  }

  .barre-filtres-tri select,
  .filtres select {
    min-width: 0;
    width: 100%;
  }

  .form-inline .form-group {
    flex: 1 1 100%;
    min-width: 0;
  }

  .form-inline .btn,
  .entete-ventes-actions .btn,
  .filtres .btn {
    width: 100%;
    min-height: 44px;
  }

  .cartes-grille {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }

  .carte {
    padding: 1rem;
  }

  .carte .valeur {
    font-size: 1.4rem;
  }

  .tableau th,
  .tableau td {
    padding: 0.6rem 0.65rem;
    font-size: 0.875rem;
  }

  /* Tableaux compacts mobile — vraies lignes, colonnes essentielles */
  .tableau-scroll {
    overflow-x: hidden;
    width: 100%;
  }

  .tableau-scroll .tableau {
    min-width: 0;
    width: 100%;
  }

  .tableau {
    display: table;
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    background: var(--blanc);
    box-shadow: 0 2px 12px var(--ombre);
    border-radius: var(--rayon);
    overflow: hidden;
  }

  .tableau thead {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    border: 0;
    display: table-header-group;
  }

  .tableau tbody {
    display: table-row-group;
  }

  .tableau tbody tr {
    display: table-row;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    overflow: visible;
  }

  .tableau tbody tr[hidden] {
    display: none !important;
  }

  .tableau thead th,
  .tableau tbody td {
    display: table-cell;
    width: auto !important;
    max-width: none;
    padding: 0.7rem 0.4rem;
    min-height: 2.75rem;
    border-bottom: 1px solid rgba(45, 70, 54, 0.1);
    text-align: left;
    font-size: 0.84rem;
    line-height: 1.35;
    word-break: break-word;
    vertical-align: middle;
  }

  .tableau thead th {
    background: var(--vert);
    color: var(--creme);
    font-weight: 650;
    white-space: nowrap;
    font-size: 0.78rem;
    padding: 0.7rem 0.4rem;
  }

  .tableau tbody td::before {
    display: none !important;
    content: none !important;
  }

  .tableau .col-mobile-hide {
    display: none !important;
  }

  /*
   * Ventes : ne pas utiliser display:none sur les colonnes secondaires —
   * sinon le colspan du détail (8) écrase Date/Total/Actions à gauche.
   * On les réduit à 0 px pour garder un modèle de colonnes stable.
   */
  .tableau.tableau-ventes .col-mobile-hide {
    display: table-cell !important;
    width: 0 !important;
    max-width: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    border: none !important;
    overflow: hidden !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    visibility: hidden;
  }

  .tableau.tableau-ventes thead .col-mobile-hide {
    display: table-cell !important;
  }

  .tableau.tableau-ventes .col-date {
    width: 34% !important;
    white-space: nowrap;
    font-size: 0.7rem;
  }

  .tableau.tableau-ventes .col-total {
    width: 18% !important;
    white-space: nowrap;
    text-align: right;
  }

  .tableau.tableau-ventes .col-actions {
    width: 48% !important;
    text-align: right;
    white-space: nowrap;
  }

  .tableau.tableau-ventes tbody td.actions-ligne {
    width: 48% !important;
    text-align: right;
  }

  .tableau tbody tr.vente-detail-row {
    background: rgba(45, 70, 54, 0.03);
  }

  .tableau tbody tr.vente-detail-row > td {
    display: table-cell;
    width: auto !important;
    max-width: none;
    padding: 0 !important;
    border-bottom: none;
  }

  .tableau tbody .vente-detail-panel {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    box-sizing: border-box;
    padding: 0.85rem 0.75rem 1rem;
  }

  .tableau tbody td.cell-checkbox {
    text-align: center;
    padding: 0.7rem 0.15rem;
  }

  .tableau.tableau-produits tbody td.cell-checkbox {
    width: 16.5% !important;
    max-width: none !important;
  }

  .tableau tbody td.cell-checkbox input[type="checkbox"] {
    width: 1.15rem;
    height: 1.15rem;
    margin: 0;
  }

  .tableau tbody td.actions-ligne,
  .tableau tbody td.actions-vente {
    white-space: nowrap;
    text-align: right;
    padding: 0.55rem 0.3rem;
  }

  .tableau tbody td.actions-vente .btn,
  .tableau tbody td.actions-ligne .btn {
    min-height: 36px;
    padding: 0.35rem 0.5rem;
    font-size: 0.78rem;
  }

  .tableau tbody .vente-detail-infos,
  .tableau tbody .vente-detail-lignes,
  .tableau tbody .vente-detail-lignes thead,
  .tableau tbody .vente-detail-lignes tbody,
  .tableau tbody .vente-detail-lignes tr {
    display: revert;
  }

  .tableau tbody .vente-detail-lignes {
    display: table;
    width: 100%;
    margin: 0;
    table-layout: fixed;
  }

  .tableau tbody .vente-detail-lignes thead {
    display: table-header-group;
  }

  .tableau tbody .vente-detail-lignes tbody {
    display: table-row-group;
  }

  .tableau tbody .vente-detail-lignes tr {
    display: table-row;
  }

  .tableau tbody .vente-detail-lignes th,
  .tableau tbody .vente-detail-lignes td {
    display: table-cell;
    padding: 0.4rem 0.5rem;
    font-size: 0.78rem;
  }

  .tableau tbody .vente-detail-infos {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.35rem 0.85rem;
    font-size: 0.85rem;
    padding: 0;
  }

  .tableau tbody td[colspan] {
    display: table-cell;
    text-align: left;
    padding: 0;
  }

  .tableau.tableau-produits .col-nom {
    min-width: 0;
    width: auto !important;
  }

  .tableau.tableau-produits .col-prix {
    white-space: nowrap;
    text-align: right;
    width: 4.75rem !important;
    max-width: 5.25rem !important;
    padding-left: 0.25rem !important;
    padding-right: 0.35rem !important;
  }

  /* Ferme + Marché ≈ 1/3 du tableau à eux deux */
  .tableau.tableau-produits .col-ferme,
  .tableau.tableau-produits .col-marche {
    width: 16.5% !important;
    max-width: none !important;
    padding-left: 0.2rem !important;
    padding-right: 0.2rem !important;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
    font-size: 0.68rem;
  }

  .tableau.tableau-produits thead .col-ferme,
  .tableau.tableau-produits thead .col-marche {
    font-size: 0.68rem;
    letter-spacing: -0.01em;
  }

  .tableau.tableau-produits tbody td.col-ferme,
  .tableau.tableau-produits tbody td.col-marche {
    width: 16.5% !important;
  }

  .tableau.tableau-users .col-nom {
    min-width: 0;
  }

  .tableau.tableau-categories .col-nom {
    min-width: 0;
  }

  .tableau.tableau-leaderboard .col-rang {
    width: 2rem !important;
    text-align: center;
    padding-left: 0.25rem;
    padding-right: 0.15rem;
  }

  .tableau.tableau-leaderboard .col-rang .rang-medaille,
  .tableau.tableau-leaderboard .col-rang .rang-num {
    min-width: 1.35rem;
    height: 1.35rem;
    font-size: 0.68rem;
  }

  .tableau.tableau-leaderboard .col-produit {
    min-width: 0;
  }

  .tableau.tableau-leaderboard .col-quantite,
  .tableau.tableau-leaderboard .col-ca,
  .tableau.tableau-leaderboard .col-prix-moy {
    white-space: nowrap;
    text-align: right;
  }

  .tableau.tableau-leaderboard tbody .leaderboard-produit {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    min-width: 0;
  }

  .tableau.tableau-leaderboard tbody .leaderboard-image,
  .tableau.tableau-leaderboard tbody .leaderboard-image-placeholder {
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
    flex-shrink: 0;
  }

  .tableau.tableau-leaderboard tbody .leaderboard-produit-infos {
    min-width: 0;
  }

  .tableau.tableau-leaderboard tbody .leaderboard-produit-infos strong {
    font-size: 0.72rem;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tableau.tableau-leaderboard tbody .leaderboard-produit-infos small {
    font-size: 0.62rem;
  }

  .tableau .btn-sm,
  .actions-vente .btn,
  .actions-ligne .btn {
    min-height: 36px;
    padding: 0.35rem 0.5rem;
    font-size: 0.78rem;
  }

  .actions-vente,
  .actions-ligne {
    gap: 0.5rem;
  }

  .vente-detail-panel {
    padding: 0.85rem 0.9rem 1rem;
  }

  .vente-detail-infos {
    grid-template-columns: max-content 1fr;
    gap: 0.35rem 0.85rem;
  }

  .vente-detail-infos dt {
    margin-top: 0;
  }

  .zone-image-produit,
  .zone-image-produit.a-image {
    min-height: 180px;
  }

  /* Hauteur barre fixe caisse (bouton panier multi-lignes + encaisser) */
  .page-caisse {
    grid-template-columns: 1fr;
    height: 100dvh;
    padding-bottom: calc(6.25rem + env(safe-area-inset-bottom));
  }

  .zone-produits {
    padding: 0.75rem;
    padding-top: max(0.75rem, env(safe-area-inset-top));
    min-height: 0;
    height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .entete-simple {
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 0.65rem;
  }

  .entete-employe {
    align-items: center;
  }

  .entete-employe > div:first-child {
    min-width: 0;
    flex: 1 1 auto;
  }

  .entete-employe-actions {
    flex-shrink: 0;
    flex-wrap: nowrap;
    margin-left: auto;
  }

  .entete-caisse {
    gap: 0.5rem;
    margin-bottom: 0.75rem;
  }

  .entete-caisse-ligne-titre {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
  }

  .entete-caisse-ligne-titre h1 {
    font-size: 1.35rem;
    min-width: 0;
  }

  .entete-caisse-ligne-outils {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }

  .entete-caisse-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
    width: auto;
    margin-top: 0;
    flex-shrink: 0;
  }

  .entete-caisse-actions .btn,
  .entete-employe-actions .btn {
    width: auto;
    min-width: 0;
    min-height: 36px;
    justify-content: center;
    text-align: center;
    font-size: 0.82rem;
    padding: 0.4rem 0.55rem;
    box-sizing: border-box;
    white-space: nowrap;
  }

  .entete-caisse-barre {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .entete-caisse-barre::-webkit-scrollbar {
    display: none;
  }

  .entete-caisse-barre .switch-espace-caisse {
    min-width: 7.5rem;
  }

  .entete-caisse-barre .barre-point-vente {
    flex: 1 1 auto;
    min-width: 0;
  }

  .btn-ventes-jour {
    width: 100%;
    min-height: 44px;
  }

  .grille-categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .btn-categorie {
    min-height: 96px;
    padding: 1rem 0.75rem;
  }

  .btn-categorie .categorie-nom {
    font-size: 1rem;
  }

  .grille-produits {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .btn-produit {
    min-height: 108px;
    padding: 0.45rem;
    font-size: 0.9rem;
  }

  .btn-produit .produit-image {
    width: 52px;
    height: 52px;
  }

  .panier {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(6.25rem + env(safe-area-inset-bottom));
    z-index: 60;
    min-height: auto;
    height: auto;
    max-height: min(calc(100dvh - 6.25rem - env(safe-area-inset-bottom) - 0.5rem), 80vh);
    border-radius: var(--rayon) var(--rayon) 0 0;
    box-shadow: 0 -6px 28px rgba(0, 0, 0, 0.28);
    transform: translateY(100%);
    transition: transform 0.25s ease;
    padding-bottom: 2rem;
    overflow: hidden;
  }

  .panier .total-panier {
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
  }

  .panier .btn-panier-secondaire {
    min-height: 48px;
    margin-bottom: 0.5rem;
  }

  .panier.is-open {
    transform: translateY(0);
  }

  .panier-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(0, 0, 0, 0.4);
  }

  .panier-backdrop[hidden] {
    display: none;
  }

  .btn-fermer-panier {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid rgba(253, 245, 230, 0.5);
    border-radius: 6px;
    background: transparent;
    color: var(--creme);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
  }

  .lignes-panier {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .quantite-controles .btn-qte {
    min-width: 2.75rem;
    height: 2.75rem;
    font-size: 1.25rem;
  }

  .quantite-controles .quantite-panier-input,
  .ligne-panier .quantite-panier-input {
    width: 4rem;
    max-width: 4rem;
    min-width: 3.5rem;
    flex-basis: 4rem;
    min-height: 2.75rem;
    font-size: 1rem;
  }

  .ligne-panier .btn-retirer {
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0;
    font-size: 1.25rem;
  }

  .btn-total-ligne {
    min-height: 2.75rem;
    min-width: 5rem;
    padding: 0.5rem 0.65rem;
  }

  .panier .btn-encaisser,
  .panier .btn-encaisser-mobile {
    display: none;
  }

  .barre-mobile-caisse {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 70;
    padding: 0.65rem;
    padding-bottom: max(0.65rem, env(safe-area-inset-bottom));
    background: var(--vert);
    border-top: 1px solid rgba(253, 245, 230, 0.2);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.15);
  }

  .btn-voir-panier {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.1rem;
    min-height: 48px;
    padding: 0.5rem 0.75rem;
    border: 2px solid rgba(253, 245, 230, 0.6);
    border-radius: 8px;
    background: rgba(253, 245, 230, 0.1);
    color: var(--creme);
    font-family: inherit;
    cursor: pointer;
    text-align: left;
  }

  .barre-panier-label {
    font-size: 0.75rem;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .barre-panier-total {
    font-size: 1.15rem;
    font-weight: 700;
  }

  .barre-panier-count {
    font-size: 0.8rem;
    opacity: 0.85;
  }

  .btn-encaisser-mobile {
    flex: 0 0 auto;
    min-width: 7.5rem;
    min-height: 48px;
    padding: 0.65rem 1rem;
    font-size: 1rem;
  }

  .modal-overlay {
    padding: max(0.75rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) max(0.75rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
    align-items: flex-end;
  }

  .modal {
    width: 100%;
    max-height: min(92vh, 100dvh);
    overflow-y: auto;
    padding: 1.25rem;
    border-radius: var(--rayon) var(--rayon) 0 0;
  }

  .modal-overlay:not(#modal-point-vente) .modal {
    margin-bottom: 0;
  }

  #modal-point-vente.modal-overlay {
    align-items: center;
    z-index: 110;
  }

  #modal-point-vente .modal {
    border-radius: var(--rayon);
  }

  #modal-reprise-session.modal-overlay {
    z-index: 105;
  }

  .grille-points-vente .btn-point-vente {
    min-height: 3.5rem;
  }

  .option-cachee-discrete input {
    width: 1.25rem;
    height: 1.25rem;
    min-width: 1.25rem;
    min-height: 1.25rem;
  }

  /* Employé */
  .page-employe {
    padding: 1rem;
    padding-top: max(1rem, env(safe-area-inset-top));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }

  .carte-pointage-date {
    flex-wrap: wrap;
  }

  .btn-heure {
    font-size: 1.1rem;
    min-height: 48px;
  }

  .horloge-face {
    width: min(220px, 72vw);
  }

  .selecteur-heure {
    max-width: 100%;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
    min-height: 48px;
  }
}

@media (max-width: 380px) {
  .grille-produits {
    grid-template-columns: 1fr 1fr;
  }

  .cartes-grille {
    grid-template-columns: 1fr;
  }
}

/* Onglets familles / paiement */
.onglets-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.onglet-categorie,
.onglet-paiement {
  padding: 0.5rem 0.85rem;
  border: 2px solid var(--vert);
  border-radius: 999px;
  background: var(--blanc);
  color: var(--vert);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.onglet-categorie.is-actif,
.onglet-paiement.is-actif {
  background: var(--vert);
  color: var(--creme);
}

.onglets-paiement {
  display: flex;
  gap: 0.5rem;
  margin: 0.75rem 0 1rem;
}

.onglet-paiement[data-onglet-paiement="black"] {
  border-color: #3d3d3d;
  color: #3d3d3d;
}

.onglet-paiement[data-onglet-paiement="black"].is-actif {
  background: #3d3d3d;
  color: #fff;
}

.select-filtre-cache {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.form-group-filtre-cache {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Recadrage image admin */
.modal-recadre-image {
  max-width: min(420px, 96vw);
}

.recadre-viewport {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto 1rem;
  border-radius: var(--rayon);
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}

.recadre-viewport:active {
  cursor: grabbing;
}

.recadre-viewport canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.recadre-cadre {
  position: absolute;
  inset: 7%;
  border: 2px solid #fff;
  border-radius: 8px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.recadre-zoom-groupe {
  margin-bottom: 1rem;
}

.modal-actions-recadre {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.modal-actions-recadre .btn-modal-action {
  flex: 1 1 auto;
  min-width: 8rem;
}

/* Changement de rôle / espace */
.barre-changer-role--sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.barre-changer-role-label {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(45, 70, 54, 0.55);
}

.liste-espaces {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.lien-espace {
  display: block;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--vert);
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.lien-espace:hover {
  background: rgba(45, 70, 54, 0.06);
}

.lien-espace.is-actif {
  background: var(--creme);
  color: var(--vert);
  border-color: rgba(45, 70, 54, 0.12);
  pointer-events: none;
}

/* Sidebar admin : intégré au menu vert */
.sidebar .barre-changer-role--sidebar {
  margin-bottom: 0.5rem;
}

.sidebar .barre-changer-role-label {
  color: rgba(253, 245, 230, 0.55);
  padding: 0 0.15rem;
}

.sidebar .lien-espace {
  color: var(--creme);
  border-color: transparent;
}

.sidebar .lien-espace:hover {
  background: rgba(253, 245, 230, 0.1);
}

.sidebar .lien-espace.is-actif {
  background: var(--creme);
  color: var(--vert);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.grille-choix-roles {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1rem;
}

.btn-choix-role {
  width: 100%;
  text-align: center;
  padding: 0.85rem 1rem;
}

.login-card-large {
  max-width: 26rem;
}

.grille-roles-utilisateur {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.checkbox-role {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.checkbox-role input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  min-width: 1.25rem;
  max-width: 1.25rem;
  max-height: 1.25rem;
  flex: 0 0 auto;
}

.label-champ {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.entete-employe-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

/* Pagination ventes admin */
.pagination-ventes {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.pagination-boutons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination-page {
  font-size: 0.9rem;
  font-weight: 600;
}

#btn-toggle-livraison-user {
  margin-top: 0.65rem;
}

/* Au-dessus de tout modal caisse (commande, catalogue, poids…) */
#modal-total-ligne.modal-overlay.is-open,
#modal-livr-total-ligne.modal-overlay.is-open,
#modal-livr-quantite.modal-overlay.is-open {
  z-index: 10000 !important;
}

/* --- Module Livraisons --- */
.layout-livraison .sidebar-livraison .sidebar-brand span {
  letter-spacing: 0.02em;
}

.barre-mode-livraison {
  position: relative;
  display: flex;
  flex-direction: row;
  gap: 0.4rem;
  margin: 0 0 0.65rem;
  padding: 0 0 0.65rem;
  box-sizing: border-box;
  max-width: 100%;
}

.barre-mode-livraison::after {
  content: '';
  position: absolute;
  left: -0.85rem;
  right: -0.85rem;
  bottom: 0;
  border-bottom: 1px solid rgba(253, 245, 230, 0.2);
  pointer-events: none;
}

/* Spécificité > .sidebar a pour éviter le padding 1.25rem qui fait déborder à droite */
.sidebar .lien-mode-livraison {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  min-height: 2.45rem;
  padding: 0.5rem 0.4rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--creme);
  border: 1px solid rgba(253, 245, 230, 0.32);
  background: rgba(253, 245, 230, 0.08);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  box-sizing: border-box;
}

.sidebar .lien-mode-livraison:hover {
  background: rgba(253, 245, 230, 0.16);
  border-color: rgba(253, 245, 230, 0.55);
  color: var(--creme);
}

.sidebar .lien-mode-livraison.is-actif {
  background: var(--creme);
  color: var(--vert);
  border-color: var(--creme);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
  pointer-events: none;
}

.layout-livraison .contenu-principal > .entete-produits {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.layout-livraison .contenu-principal > .entete-produits h1 {
  margin: 0;
}

.livr-actifs-canaux {
  margin: 0.75rem 0 0;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(45, 70, 54, 0.18);
  border-radius: 10px;
}

.livr-actifs-canaux legend {
  padding: 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--vert);
}

.livr-carres-actifs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.livr-carre-actif {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.65rem 0.5rem;
  border-radius: 10px;
  border: 1px solid rgba(45, 70, 54, 0.18);
  background: #fff;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.livr-carre-actif input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.livr-carre-actif-face {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 6px;
  border: 2px solid rgba(45, 70, 54, 0.35);
  background: transparent;
  box-sizing: border-box;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.livr-carre-actif-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--vert);
}

.livr-carre-actif:hover {
  border-color: rgba(45, 70, 54, 0.4);
  background: rgba(45, 70, 54, 0.04);
}

.livr-carre-actif:has(input:checked) {
  border-color: var(--vert);
  background: rgba(45, 70, 54, 0.08);
  box-shadow: inset 0 0 0 1px rgba(45, 70, 54, 0.08);
}

.livr-carre-actif:has(input:checked) .livr-carre-actif-face {
  background: var(--vert);
  border-color: var(--vert);
  box-shadow: inset 0 0 0 3px #fff;
}

.livr-carre-actif:has(input:focus-visible) {
  outline: 2px solid var(--terre);
  outline-offset: 2px;
}

.livr-carre-tableau {
  display: inline-block;
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  border-radius: 5px;
  border: 2px solid rgba(45, 70, 54, 0.3);
  background: transparent;
  vertical-align: middle;
  box-sizing: border-box;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.livr-carre-tableau:hover {
  border-color: var(--vert);
  background: rgba(45, 70, 54, 0.08);
}

.livr-carre-tableau.is-actif {
  background: var(--vert);
  border-color: var(--vert);
  box-shadow: inset 0 0 0 2px #fff;
}

.livr-carre-tableau.is-actif:hover {
  background: #243a2d;
  border-color: #243a2d;
}

.livr-carre-tableau:focus-visible {
  outline: 2px solid var(--terre);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.livr-prep-grille {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: start;
}

.modal-prep-tableau {
  width: min(96vw, 1100px);
  max-height: min(92vh, 100dvh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-prep-tableau.is-plein-ecran {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  border-radius: 0;
  padding: 1rem 1.25rem 1.25rem;
}

#modal-prep-tableau.is-plein-ecran-overlay {
  padding: 0;
  align-items: stretch;
  justify-content: stretch;
}

#modal-prep-tableau.is-plein-ecran-overlay .modal-prep-tableau {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  border-radius: 0;
}

.modal-prep-tableau.is-plein-ecran .livr-matrice-scroll {
  max-height: none;
  flex: 1;
  min-height: 0;
}

.livr-modal-entete-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.livr-matrice-scroll {
  overflow: auto;
  max-height: min(68vh, 100dvh);
  margin: 0.5rem 0 0;
  border: 1px solid rgba(45, 70, 54, 0.12);
  border-radius: 8px;
  background: var(--blanc, #fff);
}

.livr-matrice {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 100%;
  font-size: 0.88rem;
}

.livr-matrice th,
.livr-matrice td {
  border-bottom: 1px solid rgba(45, 70, 54, 0.1);
  border-right: 1px solid rgba(45, 70, 54, 0.08);
  padding: 0.45rem 0.55rem;
  white-space: nowrap;
  vertical-align: middle;
}

.livr-matrice thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f3eee3;
  color: var(--vert, #2D4636);
  font-weight: 700;
  text-align: center;
}

.livr-matrice th.livr-matrice-coin,
.livr-matrice td.livr-matrice-magasin {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #f3eee3;
  text-align: left;
  font-weight: 700;
  color: var(--vert, #2D4636);
  min-width: 9rem;
  max-width: 14rem;
  white-space: normal;
}

.livr-matrice thead th.livr-matrice-coin {
  z-index: 4;
}

.livr-matrice-col-lib {
  display: block;
  max-width: 7.5rem;
  white-space: normal;
  line-height: 1.25;
}

.livr-matrice-col-cond {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.75;
}

.livr-matrice-cellule {
  text-align: center;
  font-weight: 700;
  color: #111;
  min-width: 3.5rem;
}

.livr-matrice-cellule.is-vide {
  background: transparent;
  color: #bbb;
  font-weight: 500;
}

.livr-matrice-cellule.is-a-preparer {
  background: var(--livr-fluo-jaune);
}

.livr-matrice-cellule.is-en-cours {
  background: var(--livr-fluo-orange);
}

.livr-matrice-cellule.is-prete {
  background: var(--livr-fluo-vert);
}

.livr-liste-commandes {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: min(70vh, 640px);
  overflow-y: auto;
}

.livr-carte-cmd {
  background: var(--blanc);
  border: 1px solid rgba(45, 70, 54, 0.14);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  text-align: left;
}

.livr-carte-cmd:hover {
  border-color: var(--vert);
}

.livr-carte-cmd-haut {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.35rem;
}

.livr-modal-entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}

.livr-modal-entete h3 {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.btn-modal-croix {
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 8px;
  background: rgba(45, 70, 54, 0.08);
  color: var(--vert);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.btn-modal-croix:hover {
  background: rgba(45, 70, 54, 0.16);
}

.livr-lien-client {
  font-weight: 600;
  color: var(--terre);
  text-decoration: underline;
  text-underline-offset: 2px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.livr-chefs-lien {
  margin: 0.5rem 0;
}

#modal-fiche-client.modal-overlay.is-open {
  z-index: 140;
}

.livr-fiche-notes {
  margin: 0.25rem 0 0;
  white-space: pre-wrap;
}

.livr-tels {
  margin: 0.25rem 0 0.75rem;
  padding-left: 1.1rem;
}

.livr-tels a {
  color: var(--terre);
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.modal-actions-cmd-detail {
  flex-wrap: wrap;
}

.modal-actions-cmd-detail .btn-cycle-statut {
  flex: 1 1 100%;
  width: 100%;
  order: -1;
  margin-bottom: 0.15rem;
}

.livr-carte-cmd .badge-statut {
  background: rgba(45, 70, 54, 0.1);
  color: var(--vert);
  white-space: nowrap;
}

.livr-carte-cmd .badge-statut.badge-a_preparer,
#table-repartition .badge-statut.badge-a_preparer {
  background: var(--livr-fluo-jaune);
  color: #111;
}

.livr-carte-cmd .badge-statut.badge-en_cours,
#table-repartition .badge-statut.badge-en_cours {
  background: var(--livr-fluo-orange);
  color: #111;
}

.livr-carte-cmd .badge-statut.badge-prete,
.livr-carte-cmd .badge-statut.badge-en_livraison,
#table-repartition .badge-statut.badge-prete,
#table-repartition .badge-statut.badge-en_livraison {
  background: var(--livr-fluo-vert);
  color: #111;
}

.livr-carte-cmd .badge-statut.badge-livree,
#table-repartition .badge-statut.badge-livree {
  background: rgba(45, 70, 54, 0.08);
  color: #666;
}

#table-agregat tr.livr-ligne-agregat {
  cursor: pointer;
}

#table-agregat tr.livr-ligne-agregat:hover {
  background: rgba(45, 70, 54, 0.06);
}

#table-repartition tr.livr-repartition-ligne {
  cursor: pointer;
}

#table-repartition tr.livr-repartition-ligne:hover {
  background: rgba(45, 70, 54, 0.04);
}

#table-repartition tr.is-prepare {
  opacity: 0.72;
}

#table-repartition .badge-statut {
  background: rgba(45, 70, 54, 0.1);
  color: var(--vert);
  white-space: nowrap;
}

#table-repartition .badge-statut-cliquable {
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  line-height: 1.2;
}

#table-repartition .badge-statut-cliquable:hover {
  filter: brightness(0.95);
  outline: 2px solid rgba(45, 70, 54, 0.25);
  outline-offset: 1px;
}

#table-repartition .badge-statut-cliquable:disabled {
  opacity: 0.65;
  cursor: wait;
}

#table-agregat tr.is-prepare {
  background: rgba(45, 70, 54, 0.06);
  opacity: 0.75;
}

.livr-cmd-lignes {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  max-height: 280px;
  overflow-y: auto;
}

.livr-cmd-lignes .ligne-panier {
  border-bottom: 1px solid rgba(45, 70, 54, 0.12);
  padding-bottom: 0.45rem;
}

.livr-cmd-ajout {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.livr-cmd-ajout select {
  flex: 1 1 12rem;
}

/* Page commande dédiée */
.livr-commande-corps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: start;
  margin-top: 1rem;
}

.livr-cmd-grille-entete {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.livr-cmd-qtes,
.livr-cmd-ligne-50 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  align-items: end;
}

.livr-cmd-ligne-50 > .form-group {
  margin-bottom: 1rem;
}

.livr-cmd-ligne-50.is-seul {
  grid-template-columns: 1fr;
}

.livr-cmd-calibre-prix {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  align-items: end;
}

.livr-cmd-calibre-prix .form-group {
  margin-bottom: 1rem;
}

.livr-cmd-ajout-bloc .btn {
  margin-top: 0.5rem;
}

/* Produits : catégories + calibres */
.livr-cat-liste {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: min(70vh, 640px);
  overflow-y: auto;
}

.livr-cat-bloc {
  border: 1px solid rgba(45, 70, 54, 0.14);
  border-radius: 10px;
  background: var(--blanc);
  overflow: hidden;
}

.livr-cat-bloc.is-selected {
  border-color: var(--vert);
}

.livr-cat-entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  background: rgba(45, 70, 54, 0.06);
}

.livr-cat-titre {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: var(--vert);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.livr-calibres {
  display: flex;
  flex-direction: column;
  padding: 0.35rem;
}

.livr-calibre-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: inherit;
}

.livr-calibre-item:hover {
  background: rgba(45, 70, 54, 0.06);
}

.livr-calibre-item.is-selected {
  background: rgba(45, 70, 54, 0.12);
  font-weight: 600;
}

.livr-calibre-prix {
  color: var(--terre);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.livr-cat-vide {
  padding: 0.5rem 0.85rem;
  margin: 0;
}

.badge-inactif {
  font-size: 0.75rem;
  font-weight: 600;
  color: #888;
  text-transform: lowercase;
}

.livr-agregat-nom {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.livr-agregat-pastille {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 3px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.livr-agregat-pastille-a_preparer {
  background: var(--livr-fluo-jaune);
}

.livr-agregat-pastille-en_cours {
  background: var(--livr-fluo-orange);
}

.livr-agregat-pastille-prete {
  background: var(--livr-fluo-vert);
}

.livr-agregat-cond {
  display: block;
  font-weight: 400;
  color: rgba(45, 70, 54, 0.65);
  font-size: 0.8rem;
  text-transform: lowercase;
}

@media (max-width: 900px) {
  .livr-commande-corps,
  .livr-cmd-grille-entete,
  .livr-cmd-qtes,
  .livr-cmd-calibre-prix,
  .livr-cmd-ligne-50 {
    grid-template-columns: 1fr;
  }
}

.livr-carte-cmd-lignes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
  margin: 0.45rem 0 0;
  line-height: 1.35;
}

.livr-ligne-sommaire {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.2rem 0.55rem;
  border-radius: 8px;
  background: rgba(45, 70, 54, 0.06);
}

.livr-ligne-sommaire.is-a-preparer {
  background: var(--livr-fluo-jaune);
}

.livr-ligne-sommaire.is-a-preparer .livr-ligne-sommaire-nom,
.livr-ligne-sommaire.is-a-preparer .livr-ligne-sommaire-qte {
  color: #111;
}

.livr-ligne-sommaire.is-en-cours {
  background: var(--livr-fluo-orange);
}

.livr-ligne-sommaire.is-en-cours .livr-ligne-sommaire-nom,
.livr-ligne-sommaire.is-en-cours .livr-ligne-sommaire-qte {
  color: #111;
}

.livr-ligne-sommaire.is-prete {
  background: var(--livr-fluo-vert);
}

.livr-ligne-sommaire.is-prete .livr-ligne-sommaire-nom,
.livr-ligne-sommaire.is-prete .livr-ligne-sommaire-qte {
  color: #111;
}

.livr-ligne-sommaire-nom {
  font-size: 0.85rem;
  font-weight: 500;
  color: #666;
}

.livr-ligne-sommaire-qte {
  font-size: 1rem;
  font-weight: 700;
  color: var(--terre);
  letter-spacing: 0.01em;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 1rem;
}

.livr-qte-cond {
  font-weight: 600;
}

.livr-qte-nb {
  font-weight: 800;
  white-space: nowrap;
}

.livr-matrice-cellule .livr-qte-cond,
.livr-matrice-cellule .livr-qte-nb,
#table-agregat .livr-qte-cond,
#table-agregat .livr-qte-nb,
#table-repartition .livr-qte-cond,
#table-repartition .livr-qte-nb {
  display: inline;
}

.livr-matrice-cellule .livr-qte-nb,
#table-agregat .livr-qte-nb,
#table-repartition .livr-qte-nb {
  margin-left: 0.85rem;
}

.livr-chefs-entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.livr-chefs-entete label {
  margin: 0;
}

.livr-chefs-liste {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.livr-chef-paire {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.35rem;
  align-items: center;
}

.livr-chef-paire .btn-chef-retirer {
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(45, 70, 54, 0.25);
  background: #FDF5E6;
  color: #B5654D;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.livr-chef-paire .btn-chef-retirer:hover {
  background: #B5654D;
  color: #FDF5E6;
  border-color: #B5654D;
}

.livr-chefs-tournee {
  margin: 0.25rem 0 0.75rem;
  padding-left: 1.1rem;
}

.livr-chefs-tournee a {
  color: #2D4636;
}

.livr-detail-lignes {
  list-style: none;
  margin: 0.75rem 0;
  padding: 0;
}

.livr-detail-lignes li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(45, 70, 54, 0.08);
}

.livr-detail-lignes li:last-child {
  border-bottom: none;
}

.livr-detail-ligne-texte {
  flex: 1;
  min-width: 0;
}

.livr-detail-lignes .badge-statut {
  flex-shrink: 0;
  font-size: 0.78rem;
}

.livr-detail-lignes li.is-cliquable {
  cursor: pointer;
}

.livr-detail-lignes li.is-cliquable:hover {
  background: rgba(45, 70, 54, 0.04);
}

.livr-detail-lignes .badge-statut-cliquable {
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
}

.livr-detail-lignes .badge-statut-cliquable:hover {
  filter: brightness(0.95);
}

.livr-detail-lignes .badge-statut-cliquable:disabled {
  opacity: 0.7;
  cursor: wait;
}

.livr-detail-lignes .badge-statut.badge-a_preparer {
  background: var(--livr-fluo-jaune);
  color: #111;
}

.livr-detail-lignes .badge-statut.badge-en_cours {
  background: var(--livr-fluo-orange);
  color: #111;
}

.livr-detail-lignes .badge-statut.badge-prete {
  background: var(--livr-fluo-vert);
  color: #111;
}

.contenu-livraison-mobile {
  max-width: 480px;
  margin: 0 auto;
}

.livr-tournee-entete {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.livr-tournee-entete-haut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.livr-tournee-entete h1 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.2;
}

.livr-tournee-date {
  flex: 0 0 auto;
}

.livr-tournee-date input[type="date"] {
  display: block;
  min-height: 42px;
  padding: 0.4rem 0.55rem;
  border: 1px solid rgba(45, 70, 54, 0.28);
  border-radius: 8px;
  background: #fff;
  color: var(--vert, #2D4636);
  font: inherit;
  font-weight: 600;
}

.livr-tournee-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.livr-tournee-meta-item {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(45, 70, 54, 0.08);
  color: var(--vert, #2D4636);
  font-size: 0.92rem;
  font-weight: 700;
}

.livr-tournee-meta-camion {
  background: rgba(181, 101, 77, 0.12);
  color: #B5654D;
}

.livr-tournee-filtre {
  width: 100%;
  max-width: 100%;
}

.livr-tournee-compteur {
  /* remplacé par .livr-tournee-meta-item */
  margin: 0;
}

.livr-tournee-liste {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-bottom: 5.5rem;
}

.livr-itineraire-barre {
  position: sticky;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin: 0 -0.25rem;
  padding: 0.75rem 0.25rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, #FDF5E6 70%, rgba(253, 245, 230, 0));
}

.btn.btn-itineraire {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin: 0;
  padding: 0.7rem 0.85rem;
  border: 2px solid #2D4636;
  border-radius: 10px;
  background: #ffffff;
  color: #2D4636;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 8px rgba(45, 70, 54, 0.12);
}

.btn.btn-itineraire:hover,
.btn.btn-itineraire:focus-visible {
  background: #FDF5E6;
  border-color: #2D4636;
  color: #2D4636;
}

.livr-tournee-livrees {
  margin-top: 1.25rem;
  margin-bottom: 1rem;
}

.livr-tournee-livrees-titre {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  margin: 0 0 0.65rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(45, 70, 54, 0.18);
  border-radius: 8px;
  background: rgba(45, 70, 54, 0.05);
  color: var(--vert, #2D4636);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.livr-carte-tournee {
  display: flex;
  gap: 0.5rem;
  background: var(--blanc);
  border-radius: 12px;
  border: 1px solid rgba(45, 70, 54, 0.14);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(45, 70, 54, 0.08);
}

.livr-carte-tournee-ordre {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.35rem;
  background: rgba(45, 70, 54, 0.06);
  min-width: 2.75rem;
}

.btn-ordre {
  border: none;
  background: var(--blanc);
  color: var(--vert);
  width: 2.75rem;
  height: 2.75rem;
  min-width: 44px;
  min-height: 44px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.livr-carte-tournee.is-livree {
  opacity: 0.72;
}

.livr-carte-tournee-ordre-done {
  background: rgba(45, 70, 54, 0.1);
}

.livr-carte-adresse.livr-lien-maps {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.livr-prep-filtre-magasin {
  display: block;
  width: 100%;
  margin: 0.5rem 0 0.85rem;
}

.livr-carte-cmd.is-highlight {
  outline: 2px solid #B5654D;
  outline-offset: 2px;
}

.livr-histo-filtres {
  flex-wrap: wrap;
}

.livr-histo-ligne {
  cursor: pointer;
}

.livr-histo-ligne:hover {
  background: rgba(45, 70, 54, 0.06);
}

.livr-ordre-num {
  font-weight: 700;
  color: var(--vert);
  font-size: 0.9rem;
}

.livr-carte-tournee-corps {
  flex: 1;
  border: none;
  background: transparent;
  text-align: left;
  padding: 0.9rem 0.85rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font: inherit;
  color: inherit;
  min-height: 4.5rem;
}

.livr-carte-tournee-corps small,
.livr-carte-adresse {
  color: #666;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.9rem;
}

.livr-lien-maps {
  color: inherit;
  font-weight: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.livr-carte-tel {
  color: var(--terre);
  font-weight: 700;
  font-size: 1rem;
  width: fit-content;
  text-decoration: none;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.livr-carte-tel:hover {
  text-decoration: underline;
}

.livr-carte-tel-vide {
  color: #999;
  font-size: 0.85rem;
}

.livr-tels {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0;
}

.livr-tels a {
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

#table-livr-clients tbody tr.is-selected,
#table-livr-produits tbody tr.is-selected {
  background: rgba(45, 70, 54, 0.1);
}

/* Tags d’appel (magasin + jour) */
.livr-tag-pastille,
.livr-tag-pastille-inline {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  flex-shrink: 0;
  vertical-align: middle;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.livr-tag-a_appeler,
.livr-tag-option-a_appeler .livr-tag-pastille {
  background: var(--livr-fluo-jaune);
}

.livr-tag-a_rappeler,
.livr-tag-option-a_rappeler .livr-tag-pastille {
  background: var(--livr-fluo-orange);
}

.livr-tag-commande_faite,
.livr-tag-option-commande_faite .livr-tag-pastille {
  background: var(--livr-fluo-vert);
}

.livr-tag-vide {
  background: #c5c5c5;
}

.livr-tag-choix {
  border: 1px solid rgba(45, 70, 54, 0.18);
  border-radius: var(--rayon, 8px);
  padding: 0.75rem 1rem;
  margin: 0 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.livr-tag-choix legend {
  padding: 0 0.35rem;
  font-weight: 700;
  color: var(--vert, #2D4636);
}

.livr-tag-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  padding: 0.35rem 0.25rem;
  border-radius: 6px;
}

.livr-tag-option:has(input:checked) {
  background: rgba(45, 70, 54, 0.08);
}

.livr-tag-libelle {
  margin-left: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.livr-tag-note {
  font-size: 0.85rem;
  color: #666;
  font-weight: 500;
}

.col-tag-appel {
  width: 3.5rem;
  text-align: center;
}

.livr-tag-cellule {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
}

.btn-tag-cycle {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0.35rem;
  min-width: 1.85rem;
  min-height: 1.85rem;
  border-radius: 6px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-tag-cycle:hover {
  background: rgba(45, 70, 54, 0.1);
}

.btn-tag-cycle .livr-tag-pastille-inline {
  width: 0.95rem;
  height: 0.95rem;
}

.btn-tag-note {
  border: 1px solid rgba(45, 70, 54, 0.35);
  background: var(--creme, #FDF5E6);
  color: var(--vert, #2D4636);
  font-size: 0.7rem;
  font-weight: 700;
  font-style: italic;
  font-family: Georgia, 'Times New Roman', serif;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  padding: 0;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.btn-tag-note:hover {
  background: rgba(45, 70, 54, 0.12);
}

.livr-cmd-client-ligne {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.livr-cmd-client-ligne select {
  flex: 1;
  min-width: 12rem;
}

.livr-cmd-client-tag {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .livr-prep-grille {
    grid-template-columns: 1fr;
  }

  .livr-chef-paire {
    grid-template-columns: 1fr;
  }

  .livr-chef-paire .btn-chef-retirer {
    justify-self: end;
  }

  .contenu-livraison-pc .layout-produits {
    grid-template-columns: 1fr;
  }

  /* Tableau clients : sur petit écran, garder tag + magasin + tél. chef */
  #table-livr-clients .col-chef-nom,
  #table-livr-clients .col-tel-magasin,
  #table-livr-clients .col-client-actif {
    display: none;
  }
}



/* Commentaires clients + encombrement + notes préparation */
.input-commentaire-client {
  width: 100%;
  min-width: 8rem;
  border: 1px solid rgba(45, 70, 54, 0.25);
  border-radius: 0.35rem;
  padding: 0.35rem 0.5rem;
  background: #fff;
  font: inherit;
  color: #2D4636;
}
.input-commentaire-client:focus {
  outline: 2px solid #B5654D;
  border-color: #B5654D;
}
.livr-prep-note {
  margin: 0.65rem 0 0;
  padding: 0.75rem 1rem;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.35;
  color: #2D4636;
  background: #FDF5E6;
  border: 2px solid #B5654D;
  border-radius: 0.4rem;
}
.livr-prep-encombrement,
.livr-tournee-encombrement,
.livr-carte-encombrement,
.livr-prep-encombrement-ligne {
  font-weight: 700;
  color: #B5654D;
}
.livr-prep-encombrement {
  font-size: 0.95rem;
  margin-left: 0.5rem;
}
.livr-carte-encombrement {
  display: inline-block;
  margin: 0.25rem 0 0.15rem;
  font-size: 0.95rem;
}
.btn-qte-edit {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid #2D4636;
  border-radius: 0.35rem;
  background: #FDF5E6;
  color: #2D4636;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.btn-qte-edit:hover {
  background: #B5654D;
  color: #fff;
  border-color: #B5654D;
}
.input-lecture-seule {
  background: rgba(45, 70, 54, 0.06);
  font-weight: 700;
}

.badge-absent {
  display: inline-block;
  margin: 0;
  padding: 0.4rem 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #FDF5E6;
  background: #B5654D;
  border-radius: 0.35rem;
}
.ligne-jour-heures.is-absent .carte-heure-duree {
  color: #B5654D;
  font-weight: 700;
}
.checkbox-absent {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  padding: 0.85rem 1rem;
  border-top: 1px solid rgba(45, 70, 54, 0.12);
  font-weight: 600;
  color: var(--vert, #2D4636);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.checkbox-absent input[type="checkbox"] {
  width: 1.35rem;
  height: 1.35rem;
  min-width: 1.35rem;
}
