/* =========================================================
   🎨 ERP Viticole — Thème principal VITI-GEST
   ========================================================= */

/* Reset & base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
a {
  text-decoration: none;
  color: inherit;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #222;
  background: #f5f7fa;
  padding-top: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.5rem 0.75rem;
  background: #1e2d1f;
  color: #fff;
  border-radius: 6px;
  z-index: 2000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Layout global */
.app-shell {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
  background: #f5f7fa;
}

/* ======================= SIDEBAR ======================= */

.sidebar {
  position: fixed;           /* collée à l’écran */
  top: 0;
  left: 0;
  width: 240px;
  height: 100vh;             /* toute la hauteur fenêtre */
  background: #1e2d1f;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  flex-shrink: 0;
  overflow-y: auto;          /* scroll interne si menu long */
  z-index: 0;
}

/* Entête ULTRA compact : le moins de hauteur possible */
.sidebar-header {
  padding: 1rem 5rem 1rem 1rem; /* presque pas de bas */
  border-bottom: 1px solid #2c3b2d;
  display: flex;
  align-items: center;
}

.brand {
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;           /* pas d’interligne ajouté */
}

/* Liste de boutons */
.menu {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;               /* zéro espace au-dessus du 1er bouton */
}

/* Chaque bouton de menu */
.menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.6rem 1rem;     /* un peu plus compact qu’avant */
  color: #cdd8cd;
  transition: background 0.2s ease, color 0.2s ease;
}

/* Icônes inline SVG dans le menu — héritent currentColor automatiquement */
.nav-icon,
.menu a svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  min-width: 20px;  /* empêche le shrink dans le flex */
  overflow: visible;
}

/* assure qu'il n'y a pas de marge entre les liens */
.menu a + a {
  margin-top: 0;
}

.menu a:hover {
  background: #324634;
  color: #fff;
}

.menu a.active {
  background: #456e47;
  color: #fff;
  font-weight: 600;
  border-left: 4px solid #b5d7b7;
}

.sidebar-footer {
  text-align: center;
  padding: 0.8rem;
  font-size: 0.85rem;
  color: #9bb59d;
  border-top: 1px solid #2c3b2d;
  margin-top: auto;
}

/* =================== CONTENU PRINCIPAL =================== */

.main,
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
  margin-left: 240px;    /* décale le contenu pour ne pas passer sous la sidebar */
  padding-top: 0;
}

.site-header {
  background: #ffffff;
  border-bottom: 1px solid #dbe2da;
  padding: 0 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0;
  min-height: 0;
}

.site-header h1 {
  margin: 0;
  line-height: 1;
}

h1 {
  margin: 0;
}


.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0;
}

.hamburger {
  display: none !important;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid #dbe2da;
  background: #f3f6f3;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: #2e402f;
  border-radius: 2px;
}

.hamburger span + span {
  margin-top: 4px;
}

.hamburger:focus-visible {
  outline: 2px solid #88b694;
  outline-offset: 2px;
}

.site-title {
  font-size: 1rem;
  font-weight: 600;
  color: #3a4d3b;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0;
}

.user-label {
  color: #777;
}

.user-name {
  font-weight: 600;
}

.user-avatar {
  background: #456e47;
  color: #fff;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 600;
}


/* =================== MOBILE MENU =================== */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 12, 8, 0.55);
}

.mobile-menu-panel {
  position: absolute;
  inset: 0 auto 0 0;
  width: min(84vw, 320px);
  background: #152118;
  color: #f3f7f3;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  box-shadow: 10px 0 24px rgba(0, 0, 0, 0.35);
  transform: translateX(-100%);
  transition: transform 0.2s ease;
}

.mobile-menu.is-open .mobile-menu-panel {
  transform: translateX(0);
}

.mobile-menu-header {
  padding: 1rem 1.1rem 0.85rem;
  border-bottom: 1px solid #223324;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: #152118;
  z-index: 1;
}

.brand-mobile {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.mobile-menu-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.mobile-menu-actions form {
  margin: 0;
}

.mobile-menu-actions select {
  background: #1c2a1e;
  color: #f1f6f1;
  border: 1px solid #2b3f2e;
}

.mobile-menu-user {
  padding: 0.75rem 1.1rem;
  border-bottom: 1px solid #223324;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.6rem;
}

.mobile-menu-user .user-label {
  font-size: 0.85rem;
  color: #cdd9cd;
}

.mobile-menu-user .user-avatar {
  background: #3b5841;
}

.mobile-menu-footer {
  margin-top: auto;
  padding: 0.9rem 1.1rem 1.1rem;
  border-top: 1px solid #223324;
}

.mobile-menu-footer .btn {
  background: #3b5841;
  width: 100%;
}

.menu-close {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid #223324;
  background: transparent;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.menu-mobile {
  padding: 0.65rem 0 1.2rem;
}

.menu-mobile a {
  padding: 0.9rem 1.1rem;
  font-size: 0.98rem;
  color: #e4eee4;
}

.menu-mobile a:hover {
  background: #223325;
  color: #ffffff;
}

.menu-mobile a.active {
  background: #243a2b;
  color: #ffffff;
  border-left: 3px solid #9bcaa6;
}

body.menu-open {
  overflow: hidden;
}

.menu-subsection {
  padding: 0.35rem 0.85rem 0.65rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  margin-top: 0.1rem;
}

.submenu-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.35rem 0 0.15rem 0.85rem;
}

.submenu-list--lg {
  padding-left: 1.5rem;
}

.submenu-link {
  color: inherit;
  text-decoration: none;
}

.submenu-section-sep {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin: 0.25rem 0;
}

.menu-details {
  margin: 0;
  padding: 0;
}

.menu-details + .menu-details {
  margin-top: 0.35rem;
}

.menu-summary {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  list-style: none;
  color: inherit;
  font-weight: 600;
}

.menu-summary::-webkit-details-marker {
  display: none;
}

.menu-mobile .menu-subsection {
  margin: 0.2rem 0.85rem 0.55rem;
  padding: 0.35rem 0.25rem 0.4rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

.menu-mobile .submenu-list {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.2rem 0 0.2rem 0.65rem;
}

.menu-mobile .submenu-list--lg {
  padding-left: 0.95rem;
}

.menu-mobile .submenu-link {
  padding: 0.45rem 0.75rem;
  font-size: 0.92rem;
  color: #cdd9cd;
}

.menu-mobile .menu-details {
  margin: 0;
  padding: 0;
}

.menu-mobile .menu-details + .menu-details {
  margin-top: 0.3rem;
}

.menu-mobile .menu-summary {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  list-style: none;
  color: #f0f5f0;
  font-weight: 600;
  padding: 0.45rem 0.6rem;
}

.menu-mobile .menu-summary::-webkit-details-marker {
  display: none;
}

/* Zone de page */
.page,
.page-content {
  flex: 1;
  padding: 1.5rem;
  background: #f8faf8;
  max-width: none;
  width: 100%;
  margin: 0;
}

.page-title {
  font-size: 1.35rem;
  margin-bottom: 1rem;
  color: #2e402f;
  border-bottom: 2px solid #d8e4da;
  padding-bottom: 0.25rem;
}

/* ================= TABLES / FORM / BOUTONS ================= */

table {
  border-collapse: collapse;
  width: 100%;
  background: #fff;
}

th,
td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid #e2e8e4;
}

th {
  background: #edf4ee;
  font-weight: 600;
  color: #2d3e2f;
}

tr:hover {
  background: #f7fbf8;
}

button,
.btn {
  display: inline-block;
  font: inherit;
  background: #456e47;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease;
  vertical-align: middle;
}

button:hover,
.btn:hover {
  background: #588a5a;
}

/* version petite des boutons */
.btn-sm {
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
}

.btn-secondary {
  background: #667e68;
}

.btn-secondary:hover {
  background: #7d9b7f;
}

/* Messages Django */
.messages {
  margin-bottom: 1rem;
}

.alert {
  position: relative;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
  border: 1px solid transparent;
  line-height: 1.3;
  font-size: 0.95rem;
}

.alert .alert-close {
  position: absolute;
  right: 0.6rem;
  top: 0.4rem;
  border: none;
  background: transparent;
  font-size: 1.1rem;
  cursor: pointer;
  color: #444;
}

.alert-success {
  background: #e6f7ee;
  border-color: #b7e2c7;
  color: #25442c;
}

.alert-error {
  background: #fdecea;
  border-color: #f5c2c0;
  color: #611a15;
}

.alert-warning {
  background: #fff8e1;
  border-color: #ffe2a8;
  color: #5b4100;
}

.alert-info {
  background: #eef5ff;
  border-color: #c9dcff;
  color: #1f3a60;
}

/* Accessibilité & inputs */
.menu a:focus {
  outline: 2px solid #88b694;
  outline-offset: 2px;
}

.menu a:focus-visible {
  outline: 2px solid #88b694;
  outline-offset: 2px;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 0.4rem 0.5rem;
  width: 100%;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #7bbf7e;
  outline: none;
  box-shadow: 0 0 0 2px rgba(88, 138, 90, 0.2);
}

/* Cards */
.card {
  background: #fff;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.card-header {
  font-weight: 600;
  color: #2e402f;
  margin-bottom: 0.5rem;
}

/* ==================== PATCH LAYOUT GÉNÉRAL ==================== */

/* Fallback pour anciens templates */
.container,
.content,
.content-wrapper,
.wrapper,
.page-wrapper {
  width: 100%;
  max-width: none;      /* plus de limite à 1200px */
  margin: 0;            /* plus de centrage au milieu */
  padding: 1rem 2rem;   /* un peu d’air sur les côtés */
}

/* Tables larges: scroll horizontal propre */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.table-responsive table {
  min-width: 720px;
}

/* Images et iframes responsives */
img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

iframe {
  max-width: 100%;
}

/* ======================= RESPONSIVE ======================= */

@media (max-width: 768px) {
  .app-shell {
    flex-direction: column;
  }

  body {
    overflow-x: hidden;
  }

  .sidebar {
    display: none;
  }

  .main,
  .main-content {
    margin-left: 0;       /* plus de sidebar fixe ?? gauche sur mobile */
  }

  .site-header {
    padding: 0.45rem 0.75rem;
    justify-content: flex-start;
    min-height: 52px;
    position: sticky;
    top: 0;
    z-index: 900;
    background: #ffffff;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
  }

  .header-left {
    min-width: 0;
    gap: 0;
  }

  .site-header h1 {
    display: none;
  }

  .hamburger {
    display: inline-flex !important;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid #223724;
    background: #2b3f2e;
    box-shadow: 0 6px 12px rgba(18, 40, 22, 0.18);
    position: relative;
  }

  .hamburger span {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: #f1f6f1;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .hamburger span:nth-child(1) {
    top: 13px;
  }

  .hamburger span:nth-child(2) {
    top: 20px;
  }

  .hamburger span:nth-child(3) {
    top: 27px;
  }

  .user-info {
    display: none;
  }

  .menu-mobile {
    padding-bottom: 0.75rem;
  }

  .menu-mobile .menu-subsection {
    padding: 0.4rem 0.75rem 0.6rem;
    margin: 0.25rem 0.85rem 0.35rem;
  }

  .menu-mobile .submenu-list {
    padding-left: 1rem;
  }

  .menu-mobile .submenu-link {
    padding: 0.45rem 0.8rem;
    font-size: 0.95rem;
  }

  .menu-mobile .menu-summary {
    padding: 0.55rem 0.8rem 0.35rem;
  }

  .page,
  .page-content {
    max-width: none;
    margin: 0;
    padding: 1rem;
  }

  .access-choice-grid {
    grid-template-columns: 1fr;
  }

  /* N5 — dashboard harvest : réduit le padding latéral pour gagner de la place */
  .page-section {
    padding: 1rem;
  }
}

@media (min-width: 769px) {
  body,
  .app-shell,
  .main,
  .main-content {
    margin-top: 0;
    padding-top: 0;
  }

  .site-header {
    position: relative;
    top: 0;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    align-items: flex-start;
  }

  .hamburger {
    display: none;
  }

  .mobile-menu,
  .mobile-menu.is-open {
    display: none !important;
  }

  body.menu-open {
    overflow: auto;
  }
}

/* Titres de sections du dashboard */
.dashboard-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #2b3b2b;
  margin: 0;
  padding: 0.35rem 0.75rem;
  display: flex;
  align-items: center;
  gap: .35rem;
}

.dashboard-section-title span.icon {
  font-size: 2rem;
}

/* ======================= DESIGN SYSTÈME PAGES ======================= */

/* Section de page générique */
.page-section {
  padding: 1.5rem;
}

/* Header de page */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.page-subtitle {
  margin: 0;
  font-size: .9rem;
  color: #555;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.page-actions form {
  display: flex;
  align-items: stretch;
}

/* Bouton secondaire “pilule” */
.phyto-page-header {
  align-items: flex-start;
}

.phyto-page-header .page-title {
  margin-bottom: .35rem;
}

.phyto-page-actions,
.phyto-form-actions {
  justify-content: flex-end;
  align-items: center;
  gap: .5rem;
}

.phyto-page-actions .btn,
.phyto-form-actions .btn {
  white-space: nowrap;
}

@media (max-width: 768px) {
  .phyto-page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .phyto-page-actions,
  .phyto-form-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .phyto-page-actions .btn,
  .phyto-form-actions .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

.btn-pill-secondary {
  display: inline-block;
  padding: .45rem .9rem;
  border-radius: .75rem;
  border: 1px solid #d1d5db;
  font-size: .8rem;
  background: white;
  color: #555;
  text-decoration: none;
}

/* Grille de panneaux (3 colonnes responsives) */
.grid-panels-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

/* Variantes de texte / liens */
.card-subtitle {
  margin: 0 0 .75rem 0;
  font-size: .8rem;
  color: #777;
}

.card-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.item-card {
  border-radius: .75rem;
  border: 1px solid #e5e7eb;
  padding: .6rem .7rem;
}

.item-card-header {
  display: flex;
  justify-content: space-between;
  font-size: .85rem;
  gap: .5rem;
}

.item-card-meta {
  margin-top: .2rem;
  font-size: .8rem;
  color: #555;
}

.item-card-actions {
  margin-top: .35rem;
  display: flex;
  justify-content: flex-end;
  gap: .4rem;
  font-size: .75rem;
}

.item-card-date {
  font-size: .8rem;
  color: #666;
}

.link-muted {
  color: #2563eb;
  text-decoration: none;
}

.link-danger {
  color: #b91c1c;
  text-decoration: none;
}

.empty-text {
  font-size: .8rem;
  color: #999;
}

/* Chips / badges simples */
.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 1rem;
}

.chips-row.small {
  font-size: .8rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: .18rem .55rem;
  border-radius: 999px;
  font-size: .75rem;
  background: #edf4ee;
  color: #2d3e2f;
}

.chip-muted {
  background: #e5e7eb;
  color: #555;
}

.chip-success {
  background: #e6f7ee;
  color: #25623a;
}

.chip-active {
  box-shadow: 0 0 0 1px #456e47 inset;
}
.item-card-appellation {
  font-style: italic;
  font-weight: 400;
  color: #6b7280;
  margin-left: 0.35rem;
}

/* Filtres */
.filters-card {
  margin-top: .75rem;
  margin-bottom: 1rem;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .75rem 1rem;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.access-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .5rem;
  margin-top: .75rem;
}

.access-choice {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .75rem;
  border: 1px solid #e5e7eb;
  border-radius: .75rem;
  background: #fff;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.access-choice input[type="checkbox"],
.access-choice .form-check-input {
  flex: 0 0 auto;
  width: auto;
  margin: 0;
}

.access-choice span {
  line-height: 1.2;
  word-break: break-word;
}

.filter-label {
  font-size: .8rem;
  color: #777;
}

.filters-actions {
  margin-top: .75rem;
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

/* Wizard step 3: parcelles list */
.plot-list {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: .5rem;
  border: 1px solid #e2e8e4;
  border-radius: 8px;
  background: #f9fbf9;
  max-height: 420px;
  overflow: auto;
  align-items: stretch;
  text-align: left;
}
.plot-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .35rem .5rem;
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
}
.plot-option:hover {
  background: #edf4ee;
}
.plot-option-input {
  margin: 0;
  width: 18px;
  height: 18px;
}
.plot-option-body {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  flex: 1;
}
.plot-option-name {
  font-size: .95rem;
  color: #2d3e2f;
  font-weight: 600;
}
.plot-option-appellation {
  font-size: .85rem;
  color: #6b7280;
  font-style: italic;
}
.plot-option-sector {
  align-self: flex-start;
  font-size: .75rem;
  color: #5b6b5c;
  background: #edf4ee;
  border-radius: 999px;
  padding: .1rem .45rem;
}

/* Ligne de pagination */
.pagination-row {
  margin-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  font-size: .85rem;
}

.pagination-row .page-links {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

/* Notes et détails dans les cards (parcelles) */
.item-card-title {
  margin: 0 0 .15rem 0;
  font-size: 1rem;
}

.link-strong {
  color: #2e402f;
  text-decoration: none;
}

.item-card-side {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  align-items: flex-end;
}

.item-card-badge {
  font-weight: 600;
}

.item-card-notes {
  margin-top: .5rem;
  font-size: .8rem;
  color: #666;
}

/* =================== TRAVAUX — BOARD KANBAN =================== */

.kanban-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: flex-start;
  width: 100%;
}

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

.kanban-column {
  min-width: 0;
}

.kanban-column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  color: #2e402f;
  font-size: 0.9rem;
  font-weight: 600;
}

.kanban-column-header h2 {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin: 0;
}

.kanban-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.8rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: #e4ebe4;
  color: #435343;
}

.kanban-column-body {
  background: #f7f9f7;
  border-radius: 0.75rem;
  padding: 0.75rem;
  box-shadow: 0 0 0 1px #e2e6e2;
}

.kanban-card {
  background: #ffffff;
  border-radius: 0.75rem;
  padding: 0.6rem 0.7rem 0.55rem 0.7rem;
  margin-bottom: 0.6rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  border: 1px solid #e2e6e2;
  font-size: 0.85rem;
}

.kanban-card-done {
  opacity: 0.9;
}

.kanban-card-main {
  flex: 1;
  min-width: 0;
}

.kanban-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #2e402f;
  margin: 0 0 0.2rem 0;
}

.kanban-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.kanban-card-actions .btn,
.kanban-card-actions .btn-pill-secondary {
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
}

.kanban-empty {
  margin: 0.25rem 0;
  font-size: 0.85rem;
  color: #777;
  font-style: italic;
}

/* variantes de chips supplémentaires pour les compteurs travaux */
.chip-info {
  background: #eef5ff;
  color: #1f3a60;
}

.chip-warning {
  background: #fff8e1;
  color: #5b4100;
}

.chip-error {
  background: #fee2e2;
  color: #991b1b;
}

.time-entry-draft {
  border-color: #fca5a5;
}

/* =========================================================
   PAGINATION
   ========================================================= */
.pagination-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .75rem;
  padding: .75rem 1rem;
}

.pagination-info {
  font-size: .8rem;
  color: var(--color-text-muted, #718096);
  white-space: nowrap;
}

.pagination-pages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 .45rem;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #4a5568;
  font-size: .82rem;
  text-decoration: none;
  line-height: 1;
  transition: background .15s, border-color .15s;
}

.page-btn:hover {
  background: #f0f4f0;
  border-color: #a0aec0;
  color: #276f5b;
}

.page-btn-current {
  background: #276f5b;
  border-color: #276f5b;
  color: #fff;
  font-weight: 700;
  cursor: default;
}

.page-btn-current:hover {
  background: #276f5b;
  border-color: #276f5b;
  color: #fff;
}

.page-btn-disabled {
  color: #cbd5e0;
  border-color: #e2e8f0;
  cursor: default;
  background: #f7fafc;
}

.page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 2rem;
  color: #a0aec0;
  font-size: .82rem;
  pointer-events: none;
}

.pagination-jump {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin-left: .25rem;
}

.pagination-jump-label {
  font-size: .8rem;
  color: var(--color-text-muted, #718096);
  white-space: nowrap;
}

.pagination-jump-input {
  width: 4rem;
  height: 2rem;
  padding: 0 .4rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: .82rem;
  text-align: center;
  color: #4a5568;
  background: #fff;
}

.pagination-jump-input:focus {
  outline: 2px solid #276f5b;
  outline-offset: 1px;
  border-color: #276f5b;
}

/* Enlever les flèches numériques natifs sur le champ "aller à" */
.pagination-jump-input::-webkit-outer-spin-button,
.pagination-jump-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pagination-jump-input[type=number] { -moz-appearance: textfield; }

@media (max-width: 480px) {
  .pagination-jump { display: none; }
}
