body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #ffffff;
  color: #000;
}

#app {
  padding: 0 16px;
  max-width: 600px;
  margin: auto;
  padding-bottom: 100px;
}

.floating-nav {
  position: fixed;
  bottom: 20px;
  left: 16px;
  right: 16px;
  max-width: 500px;
  margin: 0 auto;
  background: #2E133A;
  border-radius: 22px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 6px;
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(46, 19, 58, 0.35);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.65rem;
  font-weight: 500;
  padding: 6px 14px;
  transition: color 0.2s ease;
  letter-spacing: 0.02em;
  width: auto;
  max-width: none;
  margin: 0;
}

.nav-item.active,
.nav-item:hover {
  color: #ffffff;
}

.nav-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border: none !important;
  border-radius: 0 !important;
  margin: 0 !important;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.nav-item.active .nav-icon,
.nav-item:hover .nav-icon {
  opacity: 1;
}

#page-home {
  margin-left: -16px;
  margin-right: -16px;
}

.home-container {
  padding: 40px 16px 20px 16px;
  width: 100%;
  box-sizing: border-box;
}

.home-title {
  font-size: 3.5rem;
  font-weight: 800;
  color: #000;
  text-align: left;
  margin: 0 0 36px 0;
  letter-spacing: -0.03em;
  line-height: 1.0;
}

.home-section-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #000;
  margin: 0 0 12px 2px;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Planning card slider */
.planning-slider {
  margin-bottom: 32px;
  margin-left: -16px;
  margin-right: -16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.planning-slider::-webkit-scrollbar {
  display: none;
}

.planning-slider-track {
  display: flex;
  gap: 14px;
  padding: 4px 16px;
}

.planning-card {
  min-width: 190px;
  max-width: 190px;
  border-radius: 18px;
  padding: 18px;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.planning-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.planning-card:active {
  transform: scale(0.97);
}

.card-client-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #000;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-month {
  font-size: 0.75rem;
  color: rgba(0, 0, 0, 0.5);
  margin-bottom: 16px;
  font-weight: 500;
}

.card-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-progress-bar {
  flex: 1;
  height: 7px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.card-progress-fill {
  height: 100%;
  background: #2E133A;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.card-progress-text {
  font-size: 0.8rem;
  font-weight: 700;
  color: #000;
  white-space: nowrap;
  min-width: 28px;
  text-align: right;
}

.planning-empty {
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.4);
  padding: 24px 0;
  font-weight: 500;
}

/* Tool buttons */
.tools-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 14px;
}

.tools-section .tool-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  color: #000;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-align: left;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  margin: 0;
  overflow: visible;
  position: relative;
}

.tools-section .tool-btn:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.tools-section .tool-btn:active {
  transform: scale(0.97);
}

.tool-btn-icon {
  width: 70px;
  height: 70px;
  object-fit: contain;
  border: none !important;
  border-radius: 0 !important;
  margin: -30px 0 -10px 0 !important;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.18));
  transition: transform 0.2s ease;
}

.tools-section .tool-btn:hover .tool-btn-icon {
  transform: translateY(-4px);
}

.tools-section .tool-btn:nth-child(1) { background: #FDD9D2; }
.tools-section .tool-btn:nth-child(2) { background: #E9D7FF; }
.tools-section .tool-btn:nth-child(3) { background: #FFE28A; }

@media (max-width: 400px) {
  .home-title {
    font-size: 2.8rem;
  }
  .planning-card {
    min-width: 170px;
    max-width: 170px;
  }
  .nav-item {
    padding: 6px 10px;
    font-size: 0.6rem;
  }
  .nav-icon {
    width: 20px;
    height: 20px;
  }
  #app {
    padding-bottom: 90px;
  }
}

@media (min-width: 1024px) {
  #app {
    padding-bottom: 110px;
  }
}

h1, h2 {
  text-align: center;
  margin-bottom: 20px;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

form,
.page input,
.page select,
.page button {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  display: block;
  box-sizing: border-box;
}

form input,
form select,
.page input,
.page select {
  font-size: 16px;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: white;
}

form button,
#btn-generer,
#printSelectedBtn {
  padding: 12px;
  font-size: 16px;
  font-weight: bold;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
  margin-top: 8px;
}

form button:hover,
#btn-generer:hover,
#printSelectedBtn:hover {
  background: #0056b3;
}

#page-generation,
#page-historique {
  text-align: center;
}

.template-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

.template-wrapper label {
  font-weight: bold;
  margin-bottom: 8px;
  font-size: 1rem;
  color: #333;
}

#template-select {
  padding: 10px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: #f9f9f9;
  transition: border-color 0.3s ease, background-color 0.3s ease;
  min-width: 250px;
}

#template-select:focus {
  border-color: #007bff;
  background-color: #fff;
  outline: none;
}

#previewZone {
  margin-top: 20px;
  text-align: center;
}

#previewZone img {
  width: 200px;
  display: block;
  margin: 0 auto;
}

#previewZone a {
  display: inline-block;
  margin-top: 10px;
  text-decoration: none;
  color: #007bff;
}

#searchInput {
  padding: 10px;
  margin-bottom: 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 16px;
  background-color: white;
}

#historyList {
  list-style: none;
  padding: 0;
  margin: 0;
}

#historyList li {
  background: white;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.client-block, .clim-block {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 15px;
  margin-bottom: 12px;
  transition: all 0.3s ease;
}

.client-block:hover, .clim-block:hover {
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.toggle-button {
  display: inline-block;
  background-color: #007bff;
  color: white;
  border: none;
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 10px;
  transition: background-color 0.3s ease;
  width: auto;
}

.toggle-button:hover {
  background-color: #0056b3;
}

.toggle-content {
  overflow: hidden;
  transition: max-height 0.3s ease;
  max-height: 0;
}

.toggle-content.open {
  max-height: none !important;
  height: auto !important;
}

.clim-toggle-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-bottom: 8px;
}

.clim-toggle-wrapper button {
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  font: inherit;
  flex-grow: 1;
  text-align: left;
}

.clim-toggle-wrapper input[type="checkbox"] {
  transform: scale(1.2);
  cursor: pointer;
}

.hidden {
  display: none;
}

.accordion {
  border: 1px solid #ccc;
  margin-bottom: 10px;
  border-radius: 8px;
  overflow: hidden;
  background: #f9f9f9;
}

.accordion-header {
  padding: 10px;
  background-color: #007bff;
  color: white;
  cursor: pointer;
  font-weight: bold;
}

.accordion-body {
  padding: 10px;
  display: none;
}

.accordion.open .accordion-body {
  display: block;
}

.clim-card {
  margin: 8px 0;
  border: 1px solid #ccc;
  padding: 8px;
  border-radius: 6px;
  background-color: #fff;
}

ul {
  padding-left: 20px;
  margin-top: 8px;
}

ul li {
  margin-bottom: 6px;
}

img {
  display: block;
  margin-top: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.template-wrapper {
  margin-bottom: 15px;
}

#template-select {
  min-width: 200px;
}

.planning-controls, .view-controls {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.planning-controls label, .view-controls label {
  font-weight: 600;
  color: #495057;
}

.planning-controls select, .view-controls select {
  padding: 0.5rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  background: white;
  min-width: 150px;
}

.planning-stats {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.planning-stats h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
}

.planning-stats p {
  margin: 0;
  opacity: 0.9;
}

.clim-list {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1rem;
  background: white;
}

.clim-item {
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.clim-item:hover {
  background: #f8f9fa;
  border-color: #007bff;
}

.clim-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  width: 100%;
}

.clim-checkbox input[type="checkbox"] {
  margin-top: 0.25rem;
  transform: scale(1.2);
}

.clim-info {
  flex: 1;
}

.clim-info strong {
  color: #007bff;
  font-size: 1.1rem;
}

.clim-info small {
  color: #6c757d;
  font-size: 0.85rem;
}

.planning-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.btn-primary {
  background: #007bff;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-primary:hover {
  background: #0056b3;
}

.btn-secondary {
  background: #6c757d;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-secondary:hover {
  background: #545b62;
}

.no-data {
  text-align: center;
  color: #dc3545;
  padding: 2rem;
  font-style: italic;
}

.view-mode {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.month-view {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1.5rem;
}

.empty-planning {
  text-align: center;
  padding: 3rem;
  color: #6c757d;
  font-style: italic;
}

.empty-planning p {
  font-size: 1.1rem;
}

.client-planning {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  background: #f8f9fa;
}

.client-header h5 {
  margin: 0 0 0.5rem 0;
  color: #495057;
  font-size: 1.1rem;
}

.client-header small {
  color: #6c757d;
  font-size: 0.85rem;
}

.client-clims {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.clim-tag {
  background: #007bff;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 500;
}

.month-planning-card {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.month-planning-card.completed {
  border: 2px solid #28a745;
  background: linear-gradient(135deg, #f8fff9, #e8f5e8);
}

.client-completed-section {
  background: #28a745;
  color: white;
  padding: 15px;
  border-radius: 8px;
  margin-top: 20px;
  margin-bottom: 20px;
  text-align: center;
  animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.completion-message {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  font-size: 1.2em;
  font-weight: 600;
}

.completion-icon {
  font-size: 1.5em;
  margin-right: 10px;
}

.completion-text {
  color: white;
}

.btn-client-report {
  background: white;
  color: #28a745;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1em;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-client-report:hover {
  background: #f8f9fa;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-client-report:active {
  transform: translateY(0);
}

.month-completed-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #28a745;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75em;
  font-weight: 600;
}

.completed-text {
  white-space: nowrap;
}

.month-card {
  position: relative;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 15px;
  transition: all 0.3s ease;
}

.month-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.month-card.has-planning {
  border-left: 4px solid #007bff;
}

.month-card.completed {
  border-left: 4px solid #28a745;
}

.client-planning {
  margin-bottom: 20px;
  padding: 15px;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  background: #f8f9fa;
}

.client-header h5 {
  margin: 0 0 5px 0;
  color: #495057;
}

.client-header small {
  color: #6c757d;
}

.client-clims {
  margin-top: 10px;
}

.clim-tag {
  display: inline-block;
  padding: 6px 12px;
  margin: 4px 8px 4px 0;
  border-radius: 4px;
  font-size: 0.9em;
}

.clim-tag.ok {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.clim-tag.ko {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

@media (max-width: 768px) {
  .month-planning-card {
    padding: 15px;
  }

  .client-completed-section {
    padding: 12px;
  }

  .completion-message {
    font-size: 1.1em;
    flex-direction: column;
    gap: 5px;
  }

  .completion-icon {
    font-size: 1.3em;
    margin-right: 0;
  }

  .btn-client-report {
    padding: 10px 20px;
    font-size: 0.9em;
  }

  .month-completed-badge {
    position: static;
    display: inline-block;
    margin-top: 10px;
  }
}

/* Planning View - New DA */
#planning-view-section {
  margin-left: -16px;
  margin-right: -16px;
}

.pv-container {
  padding: 40px 16px 20px 16px;
  width: 100%;
  box-sizing: border-box;
}

.pv-title {
  font-size: 3.5rem;
  font-weight: 800;
  color: #000;
  text-align: left;
  margin: 0 0 36px 0;
  letter-spacing: -0.03em;
  line-height: 1.0;
}

.pv-section-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #000;
  margin: 0 0 12px 2px;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Client horizontal slider */
.pv-client-slider {
  margin-bottom: 28px;
  margin-left: -16px;
  margin-right: -16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.pv-client-slider::-webkit-scrollbar {
  display: none;
}

.pv-client-track {
  display: flex;
  gap: 12px;
  padding: 4px 16px;
}

.pv-client-card {
  min-width: 140px;
  max-width: 180px;
  padding: 14px 18px;
  border-radius: 16px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.25s ease;
  border: 2px solid transparent;
  color: #000;
}

.pv-client-card:hover:not(.active) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pv-client-card:active {
  transform: scale(0.97);
}

.pv-client-card.active {
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(46, 19, 58, 0.3);
}

.pv-client-name {
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pv-client-city {
  font-size: 0.75rem;
  opacity: 0.6;
  margin-top: 2px;
}

/* Month pills */
.pv-month-pills {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  margin-left: -16px;
  margin-right: -16px;
  padding: 4px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.pv-month-pills::-webkit-scrollbar {
  display: none;
}

.pv-month-pills .pv-month-pill {
  padding: 8px 16px;
  border-radius: 20px;
  background: #f0f0f0;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: #000;
  transition: all 0.2s ease;
  flex-shrink: 0;
  width: auto;
  max-width: none;
  margin: 0;
  display: inline-block;
}

.pv-month-pills .pv-month-pill:hover:not(.active) {
  background: #e0e0e0;
}

.pv-month-pills .pv-month-pill.active {
  background: #2E133A;
  color: #fff;
}

/* Progress header */
.pv-progress-header {
  margin-bottom: 20px;
  padding: 18px;
  border-radius: 16px;
  background: #f5f5f5;
}

.pv-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.pv-progress-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: #000;
}

.pv-completed-badge {
  background: #2E133A;
  color: #fff;
  padding: 4px 14px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
}

.pv-progress-bar-large {
  height: 8px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.pv-progress-fill-large {
  height: 100%;
  background: #2E133A;
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* Clim cards */
.pv-clim-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-radius: 14px;
  background: #f9f9f9;
  border-left: 4px solid #E9D7FF;
  margin-bottom: 10px;
  transition: all 0.2s ease;
}

.pv-clim-card:hover {
  transform: translateX(4px);
}

.pv-clim-card.pv-clim-ok {
  background: #f6f0ff;
}

.pv-clim-id {
  font-weight: 700;
  font-size: 0.95rem;
  color: #000;
}

.pv-clim-status {
  padding: 4px 14px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
}

.pv-clim-status.status-ok {
  background: #d4edda;
  color: #155724;
}

.pv-clim-status.status-ko {
  background: #f8d7da;
  color: #721c24;
}

/* Report button */
.pv-report-section {
  margin-top: 24px;
}

.pv-report-section .pv-report-btn {
  background: #2E133A;
  color: #fff;
  border: none;
  padding: 16px 28px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  max-width: none;
  margin: 0;
  display: block;
}

.pv-report-section .pv-report-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(46, 19, 58, 0.3);
}

.pv-report-section .pv-report-btn:active {
  transform: scale(0.98);
}

/* Empty state */
.pv-empty {
  text-align: center;
  color: rgba(0, 0, 0, 0.4);
  padding: 40px 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

@media (max-width: 400px) {
  .pv-title {
    font-size: 2.8rem;
  }
  .pv-client-card {
    min-width: 120px;
    max-width: 150px;
    padding: 12px 14px;
  }
  .pv-month-pills .pv-month-pill {
    padding: 6px 12px;
    font-size: 0.75rem;
  }
}

/* History View - New DA */
#page-historique {
  margin-left: -16px;
  margin-right: -16px;
}

.hv-container {
  padding: 40px 16px 20px 16px;
  width: 100%;
  box-sizing: border-box;
}

.hv-title {
  font-size: 3.5rem;
  font-weight: 800;
  color: #000;
  text-align: left;
  margin: 0 0 36px 0;
  letter-spacing: -0.03em;
  line-height: 1.0;
}

.hv-section-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #000;
  margin: 0 0 12px 2px;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Client slider for history */
.hv-client-slider {
  margin-bottom: 28px;
  margin-left: -16px;
  margin-right: -16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.hv-client-slider::-webkit-scrollbar {
  display: none;
}

.hv-client-track {
  display: flex;
  gap: 12px;
  padding: 4px 16px;
}

.hv-client-card {
  min-width: 140px;
  max-width: 180px;
  padding: 14px 18px;
  border-radius: 16px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.25s ease;
  border: 2px solid transparent;
  color: #000;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.hv-client-card-content {
  flex: 1;
  min-width: 0;
}

.hv-client-info-btn {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  max-width: 24px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  cursor: pointer;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.hv-client-info-btn svg {
  width: 14px;
  height: 14px;
}

.hv-client-info-btn:hover {
  background: rgba(0, 0, 0, 0.2);
  transform: scale(1.1);
}

.hv-client-card.active .hv-client-info-btn {
  background: rgba(255, 255, 255, 0.2);
}

.hv-client-card.active .hv-client-info-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.hv-client-card:hover:not(.active) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hv-client-card:active {
  transform: scale(0.97);
}

.hv-client-card.active {
  background: #2E133A !important;
  color: #fff;
  box-shadow: 0 4px 16px rgba(46, 19, 58, 0.3);
}

.hv-client-name {
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hv-client-city {
  font-size: 0.75rem;
  opacity: 0.6;
  margin-top: 2px;
}

.hv-client-count {
  font-size: 0.7rem;
  opacity: 0.5;
  margin-top: 6px;
}

/* Search input */
.hv-search-wrapper {
  margin-bottom: 16px;
}

.hv-search-wrapper .hv-search-input {
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: 14px;
  background: #f5f5f5;
  font-size: 0.9rem;
  color: #000;
  box-sizing: border-box;
  margin: 0;
  max-width: none;
}

.hv-search-wrapper .hv-search-input::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

.hv-search-wrapper .hv-search-input:focus {
  outline: none;
  background: #efefef;
}

/* Clim list */
.hv-clim-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.hv-clim-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-left: 4px solid;
}

.hv-clim-card:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.hv-clim-card:active {
  transform: scale(0.98);
}

.hv-clim-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.hv-clim-qr-mini {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  border: none !important;
}

.hv-clim-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hv-clim-id {
  font-weight: 700;
  font-size: 0.95rem;
  color: #000;
}

.hv-clim-meta {
  font-size: 0.75rem;
  color: rgba(0, 0, 0, 0.5);
}

.hv-clim-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hv-clim-checkbox {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #fff;
  border: 2px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hv-clim-checkbox.checked {
  background: #2E133A;
  border-color: #2E133A;
}

.hv-clim-checkbox svg {
  width: 14px;
  height: 14px;
}

.hv-clim-arrow {
  color: rgba(0, 0, 0, 0.3);
  font-size: 1.2rem;
}

/* Actions */
.hv-actions {
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hv-actions .hv-action-btn {
  flex: 1;
  min-width: 140px;
  padding: 14px 20px;
  border: none;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #2E133A;
  color: #fff;
  margin: 0;
  max-width: none;
}

.hv-actions .hv-action-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.hv-actions .hv-action-btn.hv-action-secondary {
  background: #f0f0f0;
  color: #000;
}

.hv-actions .hv-action-btn.hv-action-secondary:hover {
  background: #e5e5e5;
}

/* Empty state */
.hv-empty {
  text-align: center;
  color: rgba(0, 0, 0, 0.4);
  padding: 40px 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

@media (max-width: 400px) {
  .hv-title {
    font-size: 2.8rem;
  }
  .hv-client-card {
    min-width: 120px;
    max-width: 150px;
    padding: 12px 14px;
  }
  .hv-actions {
    flex-direction: column;
  }
  .hv-actions .hv-action-btn {
    width: 100%;
  }
}

/* Clim Detail Page */
#page-clim-detail {
  margin-left: -16px;
  margin-right: -16px;
}

.cd-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.cd-back-btn {
  background: none;
  border: none;
  color: #2E133A;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  padding: 10px 14px 10px 10px;
  width: auto;
  max-width: none;
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 10px;
  transition: background 0.2s ease;
  margin: 0;
}

.cd-back-btn:hover {
  background: rgba(46, 19, 58, 0.08);
}

.cd-back-btn:active {
  transform: scale(0.96);
}

.cd-back-icon {
  font-size: 1.4rem;
  line-height: 1;
  margin-top: -1px;
}

.cd-header-actions {
  display: flex;
  gap: 8px;
}

.cd-header-btn {
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  width: auto;
  max-width: none;
  margin: 0;
}

.cd-header-btn:active {
  transform: scale(0.96);
}

.cd-delete-btn {
  background: #FDD9D2;
  color: #9c2b1c;
}

.cd-delete-btn:hover {
  background: #fcc9bf;
}

.cd-container {
  padding: 20px 16px 40px 16px;
  width: 100%;
  box-sizing: border-box;
}

.cd-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: #000;
  text-align: left;
  margin: 0 0 8px 0;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.cd-client-info {
  font-size: 0.9rem;
  color: rgba(0, 0, 0, 0.5);
  margin: 0 0 24px 0;
}

.cd-qr-section {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.cd-qr-image {
  width: 180px;
  height: 180px;
  border-radius: 16px;
  background: #f5f5f5;
  object-fit: contain;
  border: none !important;
}

.cd-section-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #000;
  margin: 24px 0 12px 2px;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cd-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  gap: 12px;
}

.cd-section-header .cd-section-label {
  margin: 0;
}

.cd-edit-infos-btn {
  background: #f5f5f5;
  color: #2E133A;
  border: none;
  padding: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 36px !important;
  height: 36px !important;
  max-width: 36px !important;
  min-width: 36px !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0;
  flex-grow: 0;
  box-sizing: border-box;
}

.cd-edit-infos-btn:hover {
  background: #ebebeb;
}

.cd-edit-infos-btn:active {
  transform: scale(0.92);
}

.cd-edit-infos-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin: 0 auto;
}

.cd-edit-infos-btn .cd-icon-edit {
  display: block;
}

.cd-edit-infos-btn .cd-icon-check {
  display: none;
}

.cd-edit-infos-btn.save-mode {
  background: #2E133A;
  color: #fff;
}

.cd-edit-infos-btn.save-mode:hover {
  background: #3d1a4d;
}

.cd-edit-infos-btn.save-mode .cd-icon-edit {
  display: none;
}

.cd-edit-infos-btn.save-mode .cd-icon-check {
  display: block;
}

.cd-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cd-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f9f9f9;
  transition: all 0.2s ease;
  text-decoration: none;
  color: #000;
}

.cd-list-item:hover {
  background: #f0f0f0;
  transform: translateX(4px);
}

.cd-list-item-name {
  font-size: 0.9rem;
  font-weight: 600;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cd-list-item-date {
  font-size: 0.75rem;
  color: rgba(0, 0, 0, 0.4);
  margin-left: 12px;
}

.cd-list-item-icon {
  color: rgba(0, 0, 0, 0.3);
  font-size: 1rem;
  margin-left: 8px;
}

.cd-empty {
  text-align: center;
  color: rgba(0, 0, 0, 0.3);
  padding: 20px;
  font-size: 0.85rem;
}

/* Onglets pour page client detail */
.cld-tabs {
  display: flex;
  gap: 8px;
  margin: 24px 0 16px 0;
  border-bottom: 2px solid #f0f0f0;
}

.cld-tab {
  background: transparent;
  border: none;
  padding: 12px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}

.cld-tab:hover {
  color: rgba(0, 0, 0, 0.7);
}

.cld-tab.active {
  color: #2E133A;
  border-bottom-color: #2E133A;
}

.cld-tab-content {
  display: none;
}

.cld-tab-content.active {
  display: block;
}

.cld-download-excel-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #2E133A;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 20px 0;
  width: fit-content;
}

.cld-download-excel-btn:hover {
  background: #1f0d28;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(46, 19, 58, 0.3);
}

.cld-download-excel-btn:active {
  transform: translateY(0);
}

.cld-download-excel-btn svg {
  width: 20px;
  height: 20px;
}

/* Technical infos card */
.cd-infos-card {
  background: #f9f9f9;
  border-radius: 14px;
  padding: 18px;
  margin-top: 12px;
  margin-bottom: 12px;
}

.cd-info-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.cd-info-row:last-child {
  border-bottom: none;
}

.cd-info-label {
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.5);
}

.cd-info-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: #000;
  text-align: right;
}

.cd-info-input {
  font-size: 0.85rem;
  font-weight: 600;
  color: #000;
  text-align: right;
  border: none;
  background: transparent;
  padding: 4px 0;
  border-radius: 0;
  outline: none;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
  width: 100px;
  min-width: auto;
  max-width: 100px;
  margin-left: auto;
}

.cd-info-input:focus {
  border-bottom-color: #2E133A;
}

.cd-infos-card.editing {
  background: #f9f9f9;
}

.cd-infos-card.editing .cd-info-row {
  padding: 10px 0;
}

@media (max-width: 400px) {
  .cd-title {
    font-size: 1.8rem;
  }
  .cd-qr-image {
    width: 150px;
    height: 150px;
  }
}

.burger-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.burger-menu.active {
  pointer-events: all;
  opacity: 1;
}

.burger-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.burger-menu.active .burger-overlay {
  opacity: 1;
}

.burger-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
  transform: translateY(100%);
  transition: transform 0.3s ease;
  max-height: 60vh;
  overflow-y: auto;
}

.burger-menu.active .burger-content {
  transform: translateY(0);
}

.burger-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
  position: sticky;
  top: 0;
  background: white;
  z-index: 1;
}

.burger-header h3 {
  margin: 0;
  font-size: 1.2rem;
  color: #333;
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.close-btn:hover {
  background: #f0f0f0;
}

.burger-items {
  padding: 10px;
}

.burger-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 16px;
  margin-bottom: 8px;
  border: none;
  border-radius: 12px;
  background: #f8f9fa;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.burger-item:hover {
  background: #e9ecef;
  transform: translateX(4px);
}

.burger-item:active {
  transform: scale(0.98) translateX(4px);
}

.burger-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.burger-item div {
  flex: 1;
}

.burger-item strong {
  display: block;
  color: #333;
  font-size: 16px;
  margin-bottom: 4px;
}

.burger-item small {
  display: block;
  color: #666;
  font-size: 13px;
  line-height: 1.3;
}

.burger-btn {
  background: white;
  color: #007bff;
}

.burger-btn:hover {
  background: white;
}

.burger-item-logout {
  background: #ffe5e5 !important;
  border: 1px solid #ffcccc;
  margin-top: 10px;
}

.burger-item-logout:hover {
  background: #ffd0d0 !important;
}

.burger-item-logout strong {
  color: #dc3545 !important;
}

.burger-item-logout small {
  color: #a02834 !important;
}

@media (min-width: 768px) {
  .burger-content {
    left: 50%;
    transform: translate(-50%, 100%);
    max-width: 500px;
    border-radius: 20px 20px 0 0;
  }

  .burger-menu.active .burger-content {
    transform: translate(-50%, 0);
  }
}
