/**
 * App Heures - AIR-ELEC V2
 * macOS-style professional design
 * Charts, calendar, KPI cards, day detail
 */

/* ─── Layout ─── */
.heures-app {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #f3f4f6;
  font-family: var(--font-sans);
  position: relative;
  overflow: hidden;
}

.heures-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 20px 20px 0;
}
.heures-scroll::-webkit-scrollbar { width: 6px; }
.heures-scroll::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.1);
  border-radius: 3px;
}

/* ─── Toolbar ─── */
.heures-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 0.5px solid var(--gray-200);
  flex-shrink: 0;
}
.heures-toolbar-spacer { flex: 1; }

.heures-btn-primary {
  padding: 8px 18px;
  background: var(--green);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  box-shadow: 0 2px 8px rgba(90,158,53,0.25);
  transition: all 0.2s var(--ease-ios);
}
.heures-btn-primary:hover {
  background: var(--green-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(90,158,53,0.3);
}
.heures-btn-primary i { width: 14px; height: 14px; }

.heures-btn-ghost {
  padding: 8px 14px;
  background: transparent;
  border: 0.5px solid var(--gray-200);
  border-radius: 8px;
  color: var(--gray-600);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  transition: all 0.12s;
}
.heures-btn-ghost:hover {
  background: var(--gray-100);
  color: var(--gray-800);
  border-color: var(--gray-300);
}
.heures-btn-ghost i { width: 14px; height: 14px; }


/* ════════════════════════════════════════
   KPI STATS CARDS — migrated to unified kpi.css
   ════════════════════════════════════════ */

/* Keep heures-stat-icon — icône sans fond carré (la couleur est dans la bordure gauche kpi-card) */
.heures-stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  flex-shrink: 0;
}
.heures-stat-icon i { width: 18px; height: 18px; color: var(--green); }
.heures-stat-card--mois   .heures-stat-icon i { color: var(--green); }
.heures-stat-card--semaine .heures-stat-icon i { color: var(--green-light); }
.heures-stat-card--jour   .heures-stat-icon i { color: var(--gray-600); }
.heures-stat-card--jours  .heures-stat-icon i { color: var(--green-mid); }
.heures-stat-unit {
  font-size: 15px;
  font-weight: 500;
  color: #c7c7cc;
  margin-left: 2px;
  font-family: var(--font-mono);
}


/* ════════════════════════════════════════
   SECTION HEADERS
   ════════════════════════════════════════ */

.heures-section {
  margin-bottom: 16px;
}
.heures-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 0 2px;
}
.heures-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: -0.1px;
}
.heures-section-title i {
  width: 14px;
  height: 14px;
  color: var(--gray-500);
}

.heures-header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(0,0,0,0.04);
  border-radius: 8px;
  padding: 2px;
}
.heures-header-nav-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  transition: all 0.12s;
}
.heures-header-nav-btn:hover {
  background: rgba(255,255,255,0.9);
  color: var(--gray-800);
}
.heures-header-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-800);
  min-width: 96px;
  text-align: center;
}


/* ════════════════════════════════════════
   DASHBOARD GRID — 2 columns
   ════════════════════════════════════════ */

.heures-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.heures-dashboard-grid .heures-section { margin-bottom: 0; }


/* ════════════════════════════════════════
   RÉPARTITION PAR CHANTIER — Chart.js
   ════════════════════════════════════════ */

.heures-repartition-card {
  background: #ffffff;
  border-radius: 16px;
  border: 0.5px solid rgba(0,0,0,0.06);
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.heures-repartition-chart-wrap {
  position: relative;
  height: 60px;
  margin-bottom: 14px;
  padding-right: 2px;
}
.heures-repartition-card canvas {
  width: 100% !important;
  height: 100% !important;
}

.heures-repartition-legend {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.heures-repartition-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.12s;
}
.heures-repartition-legend-item:hover {
  background: rgba(0,0,0,0.04);
}
.heures-repartition-legend-item.active {
  background: rgba(90,158,53,0.08);
}
.heures-repartition-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.heures-repartition-legend-name {
  flex: 1;
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-800);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.heures-repartition-legend-value {
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--gray-700);
  min-width: 38px;
  text-align: right;
}
.heures-repartition-legend-pct {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  min-width: 32px;
  text-align: right;
  font-family: var(--font-mono);
}
.heures-repartition-legend-more {
  font-size: 11px;
  color: var(--gray-500);
  padding: 6px 10px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.12s;
}
.heures-repartition-legend-more:hover {
  background: rgba(0,0,0,0.04);
  color: var(--gray-700);
}


/* ════════════════════════════════════════
   WEEKLY BAR CHART — stacked by chantier
   ════════════════════════════════════════ */

.heures-week-chart {
  display: flex;
  gap: 4px;
  height: 200px;
  align-items: flex-end;
  background: #ffffff;
  border-radius: 16px;
  border: 0.5px solid rgba(0,0,0,0.06);
  padding: 16px 14px 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}



.heures-week-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: flex-end;
  position: relative;
}

.heures-week-bar-container {
  width: 100%;
  max-width: 40px;
  flex: 1;
  display: flex;
  flex-direction: column-reverse;
  gap: 1px;
  min-height: 4px;
}

.heures-week-bar {
  width: 100%;
  min-height: 4px;
  transition: all 0.3s var(--ease-ios);
}
.heures-week-bar--empty {
  background: var(--gray-100);
  height: 6px;
  flex: 0 0 6px;
  border-radius: 4px;
  width: 60%;
  align-self: center;
}

.heures-week-bar-segment {
  width: 100%;
  border-radius: 6px;
  min-height: 6px;
  transition: all 0.3s var(--ease-ios);
}
.heures-week-bar-segment:hover {
  filter: brightness(1.1);
  transform: scaleX(1.05);
}

.heures-week-bar-value {
  font-size: 10px;
  font-weight: 700;
  color: var(--gray-700);
  font-family: var(--font-mono);
  line-height: 1;
  height: 16px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.heures-week-bar-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--gray-400);
  letter-spacing: 0.2px;
}


/* ════════════════════════════════════════
   CALENDAR — macOS Calendar.app style
   ════════════════════════════════════════ */

.heures-calendar {
  background: #ffffff;
  border-radius: 16px;
  border: 0.5px solid rgba(0,0,0,0.06);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Header row: day names */
.heures-cal-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 0.5px solid rgba(0,0,0,0.05);
  background: transparent;
}
.heures-cal-header-cell {
  padding: 14px 0 10px;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  color: var(--gray-400);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Body grid */
.heures-cal-body {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

/* Day cell */
.heures-cal-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 8px 4px 4px;
  cursor: pointer;
  transition: background 0.12s;
  min-height: 58px;
  /* JS sets border-bottom inline for chantier color liseré */
  border-right: 0.5px solid rgba(0,0,0,0.03);
  border-left: none;
  border-top: none;
}
/* Remove right border for last column */
.heures-cal-day:nth-child(7n) {
  border-right: none;
}

.heures-cal-day:hover {
  background: rgba(0,0,0,0.03);
}

.heures-cal-day--empty {
  cursor: default;
  opacity: 0.3;
}
.heures-cal-day--empty:hover {
  background: transparent;
}

/* Weekend */
.heures-cal-day--weekend {
  opacity: 0.5;
}
.heures-cal-day--weekend .heures-cal-day-hours {
  color: var(--gray-300);
}

.heures-cal-day-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-800);
  line-height: 1;
  flex-shrink: 0;
  border-radius: 50%;
  transition: all 0.12s;
  margin-top: 2px;
}

.heures-cal-day--today .heures-cal-day-number {
  background: var(--green);
  color: white;
  font-weight: 700;
}

.heures-cal-day--selected {
  background: rgba(90,158,53,0.08);
}
.heures-cal-day--selected .heures-cal-day-number {
  border: 2px solid var(--green);
  color: var(--green);
  font-weight: 700;
  line-height: 26px;
}
.heures-cal-day--selected:hover {
  background: rgba(90,158,53,0.12);
}

.heures-cal-day--today.heures-cal-day--selected .heures-cal-day-number {
  background: var(--green);
  border-color: var(--green);
  border-width: 2.5px;
  color: white;
}

/* Hours label below number */
.heures-cal-day-hours {
  font-size: 9px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--gray-500);
  line-height: 1;
  margin-top: 3px;
}

/* Colored dots for each chantier in calendar cells */
.heures-cal-dots {
  display: flex;
  gap: 3px;
  justify-content: center;
  align-items: center;
  margin-top: 2px;
  flex-wrap: wrap;
  max-width: 100%;
  padding: 0 2px;
}
.heures-cal-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 0.5px rgba(0,0,0,0.06);
}


/* ════════════════════════════════════════
   DAY DETAIL PANEL — bottom slide-up
   ════════════════════════════════════════ */

.heures-day-detail {
  background: rgba(255,255,255,0.85);
  border-top: 0.5px solid rgba(0,0,0,0.06);
  padding: 14px 20px;
  flex-shrink: 0;
  max-height: 260px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.04);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  transition: max-height 0.3s var(--ease-ios);
}
.heures-day-detail.collapsed {
  max-height: 48px;
}
.heures-day-detail.collapsed .heures-day-detail-entries {
  opacity: 0;
  pointer-events: none;
}

.heures-day-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}
.heures-day-detail-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 8px;
}
.heures-day-detail-title i {
  width: 14px;
  height: 14px;
  color: var(--gray-400);
  transition: transform 0.25s var(--ease-ios);
}
.heures-day-detail-total {
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--green);
  background: rgba(90,158,53,0.1);
  padding: 3px 10px;
  border-radius: 6px;
}

.heures-day-detail-entries {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: opacity 0.2s;
}
.heures-day-detail-entries::-webkit-scrollbar { width: 4px; }
.heures-day-detail-entries::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.08);
  border-radius: 2px;
}


/* ════════════════════════════════════════
   ENTRY ITEMS
   ════════════════════════════════════════ */

.heures-entry-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: white;
  border-radius: 10px;
  border: 0.5px solid var(--gray-100);
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  transition: all 0.12s;
  cursor: pointer;
  position: relative;
}
.heures-entry-item:hover {
  border-color: var(--gray-200);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.heures-entry-item:active {
  transform: scale(0.99);
}

.heures-entry-item--deleting {
  opacity: 0.4;
  pointer-events: none;
}

/* ─── Km badge for Déplacement ─── */
.heures-entry-km {
  font-size: 10px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--orange);
  background: rgba(255,149,0,0.1);
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ─── Entry actions — mobile swipe ─── */
.heures-entry-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.heures-entry-action {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
  background: transparent;
  font-size: 14px;
}
.heures-entry-action--edit {
  color: var(--blue);
  background: rgba(0,122,255,0.08);
}
.heures-entry-action--edit:hover {
  background: rgba(0,122,255,0.15);
}
.heures-entry-action--delete {
  color: var(--red);
  background: rgba(255,59,48,0.08);
}
.heures-entry-action--delete:hover {
  background: rgba(255,59,48,0.15);
}

.heures-entry-time {
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--gray-600);
  min-width: 72px;
  flex-shrink: 0;
}

.heures-entry-info {
  flex: 1;
  min-width: 0;
}
.heures-entry-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 1px;
}
.heures-entry-sub {
  font-size: 10px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 6px;
}

.heures-entry-duree {
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--gray-700);
  flex-shrink: 0;
}

.heures-entry-type {
  font-size: 8px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.heures-entry-type--travail {
  background: rgba(90,158,53,0.1);
  color: var(--green);
}
.heures-entry-type--fournisseur {
  background: rgba(0,122,255,0.1);
  color: var(--blue);
}
.heures-entry-type--deplacement {
  background: rgba(255,149,0,0.1);
  color: var(--orange);
}


/* ════════════════════════════════════════
   EMPTY STATE
   ════════════════════════════════════════ */

.heures-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  color: var(--gray-400);
  gap: 6px;
}
.heures-empty-text {
  font-size: 12px;
  font-weight: 500;
}
.heures-empty i {
  width: 22px;
  height: 22px;
  color: var(--gray-300);
}


/* ════════════════════════════════════════
   MODAL — Saisie d'heures
   ════════════════════════════════════════ */

.heures-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: heuresFadeIn 0.2s var(--ease-ios);
}

.heures-modal {
  background: rgba(255,255,255,0.92);
  border-radius: 16px;
  width: 400px;
  max-width: 88%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 0 0 0.5px rgba(0,0,0,0.06),
    0 12px 30px rgba(0,0,0,0.12),
    0 30px 70px rgba(0,0,0,0.15);
  overflow: hidden;
  animation: heuresSlideUp 0.25s var(--ease-ios);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
}

.heures-modal-header {
  padding: 18px 20px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.heures-modal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-900);
}
.heures-modal-close {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: none;
  background: var(--gray-100);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  transition: all 0.12s;
}
.heures-modal-close:hover {
  background: var(--gray-200);
  color: var(--gray-700);
}

.heures-modal-body {
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.heures-modal-detail-sm {
  max-width: 380px;
}

.heures-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.heures-form-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-600);
  letter-spacing: 0.02em;
}
.heures-form-input {
  padding: 12px 14px;
  border: 0.5px solid var(--gray-200);
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  font-family: var(--font-sans);
  transition: all 0.12s;
  background: rgba(255,255,255,0.8);
}
.heures-form-input:focus {
  background: white;
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(90,158,53,0.12);
}

.heures-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.heures-form-hint {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: -4px;
  margin-bottom: 4px;
}
.heures-form-text {
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 8px;
}
.heures-form-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-700);
  cursor: pointer;
  margin-top: 8px;
}
.heures-form-checkbox input[type="checkbox"] { accent-color: var(--green); }
.heures-form-toggle-group {
  display: flex;
  gap: 2px;
  background: var(--gray-100);
  border-radius: 8px;
  padding: 2px;
}
.heures-form-toggle { display: none; }
.heures-form-toggle-label {
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  color: var(--gray-600);
  transition: all 0.12s;
}
.heures-form-toggle:checked + .heures-form-toggle-label {
  background: white;
  color: var(--gray-900);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.heures-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 8px;
}
.heures-form-actions--edit {
  justify-content: space-between;
}

.heures-btn-delete {
  padding: 8px 14px;
  border: 0.5px solid rgba(255,59,48,0.2);
  border-radius: 8px;
  background: rgba(255,59,48,0.06);
  color: var(--red);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.12s;
}
.heures-btn-delete:hover {
  background: rgba(255,59,48,0.12);
  border-color: rgba(255,59,48,0.3);
}

.heures-btn-secondary {
  padding: 8px 16px;
  border: 0.5px solid var(--gray-200);
  border-radius: 8px;
  background: white;
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.12s;
}
.heures-btn-secondary:hover {
  background: var(--gray-50);
}

.heures-btn-save {
  padding: 8px 18px;
  background: var(--green);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-sans);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(90,158,53,0.25);
  transition: all 0.12s;
}
.heures-btn-save:hover {
  background: var(--green-light);
  box-shadow: 0 4px 12px rgba(90,158,53,0.3);
}


/* ════════════════════════════════════════
   DETAIL MODAL — event segment click
   ════════════════════════════════════════ */

.heures-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 0.5px solid var(--gray-200);
  margin-bottom: 4px;
}
.heures-detail-date {
  font-size: 13px;
  color: var(--gray-600);
  font-weight: 500;
}
.heures-detail-total {
  font-size: 15px;
  font-weight: 700;
  color: var(--green);
}

.heures-detail-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.heures-detail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 0.5px solid var(--gray-100);
  background: white;
  transition: all 0.12s;
}
.heures-detail-item:hover {
  background: var(--gray-50);
}
.heures-detail-item-left {
  flex: 1;
  min-width: 0;
}
.heures-detail-item-time {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-900);
}
.heures-detail-item-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.heures-detail-item-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.heures-detail-item-duree {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-800);
  white-space: nowrap;
}

.heures-modal-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 0 20px 20px;
}

.heures-detail-date-badge {
  display: inline-flex;
  align-self: flex-start;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  background: var(--gray-100);
  padding: 6px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
}

.heures-detail-card {
  background: white;
  border-radius: 14px;
  border: 0.5px solid var(--gray-100);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.heures-detail-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.heures-detail-duree {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--green);
}

.heures-detail-horaire {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-900);
  font-family: var(--font-mono);
}

.heures-detail-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
  line-height: 1.4;
}

.heures-detail-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 6px;
  border-top: 0.5px solid var(--gray-100);
}

.heures-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.heures-detail-row-label {
  color: var(--gray-500);
}

.heures-detail-row-value {
  color: var(--gray-800);
  font-weight: 500;
}


/* ════════════════════════════════════════
   EXPORT LIST — modal items
   ════════════════════════════════════════ */

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

.heures-export-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 0.5px solid var(--gray-200);
  background: white;
  cursor: pointer;
  transition: all 0.12s;
  font-family: var(--font-sans);
  width: 100%;
  text-align: left;
  font-size: inherit;
}
.heures-export-item:hover {
  background: var(--gray-50);
  border-color: var(--green);
}

.heures-export-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--green-pale);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.heures-export-icon i { width: 18px; height: 18px; }

.heures-export-info {
  flex: 1;
  min-width: 0;
}
.heures-export-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-900);
  display: block;
}
.heures-export-desc {
  font-size: 11px;
  color: var(--gray-500);
  display: block;
  margin-top: 1px;
}


/* ════════════════════════════════════════
   ANIMATIONS
   ════════════════════════════════════════ */

@keyframes heuresFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes heuresSlideUp {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}


/* ════════════════════════════════════════
   RESPONSIVE — mobile
   ════════════════════════════════════════ */

@media (max-width: 767px) {
  /* KPI cards: handled by kpi.css media query */
  .heures-scroll {
    padding: 12px;
  }
  .heures-week-chart {
    height: 150px;
  }
  .heures-cal-day {
    min-height: 44px;
    padding: 6px 2px 2px;
  }
  .heures-cal-day-number {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }
  .heures-cal-day--today .heures-cal-day-number,
  .heures-cal-day--selected .heures-cal-day-number {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }
  .heures-cal-day-hours {
    font-size: 7px;
  }
  .heures-cal-header-cell {
    padding: 10px 0 6px;
    font-size: 9px;
  }
  .heures-week-bar-value {
    font-size: 9px;
  }
  .heures-week-bar-container {
    max-width: 30px;
  }

  .heures-toolbar {
    padding: 10px 12px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .heures-btn-primary {
    width: 36px; height: 36px; padding: 0;
    font-size: 0; display: inline-flex; align-items: center; justify-content: center; gap: 0;
  }
  .heures-btn-primary svg { width: 20px !important; height: 20px !important; }
  .heures-section-title {
    font-size: 10px;
  }
  .heures-header-label {
    font-size: 11px;
    min-width: 72px;
  }
  .heures-header-nav-btn {
    width: 22px;
    height: 22px;
  }

  /* iOS modals — bottom sheet style */
  .heures-modal-overlay {
    align-items: flex-end;
  }
  .heures-modal {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 85%;
    border-radius: 14px 14px 0 0;
  }
  .heures-form-row {
    grid-template-columns: 1fr;
  }
  .heures-entry-actions {
    display: none;
  }
}
