/* ─── Compteur session (ancré / flottant déplaçable) ──────────────────────── */

#session-panel-footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 10px 10px;
  border-top: 1px solid var(--border);
}

.session-timer {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 12px 9px 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  color: var(--text-primary);
  user-select: none;
  touch-action: none;
  cursor: grab;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease,
    box-shadow 0.18s ease;
}

.session-timer--visible {
  opacity: 1;
  transform: translateY(0);
}

.session-timer--floating {
  position: fixed;
  z-index: 250;
  width: auto;
  max-width: calc(100vw - 16px);
  margin: 0;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  background: var(--bg-card);
  border-color: var(--border);
}

/* Pas de fond semi-transparent en mode flottant */
.session-timer--floating.session-timer--resume {
  background: var(--bg-card);
  border-color: var(--orange);
}

.session-timer--floating.session-timer--paused {
  background: var(--bg-card);
}

.session-timer--floating.session-timer--paused .session-timer-pause {
  background: var(--bg-surface);
}

.session-timer--dragging {
  cursor: grabbing;
  box-shadow: var(--shadow-lg);
  transition: none;
}

.session-timer-grip {
  font-size: 14px;
  line-height: 1;
  color: var(--text-muted);
  flex-shrink: 0;
  padding: 0 2px;
  cursor: grab;
}

.session-timer--dragging .session-timer-grip {
  cursor: grabbing;
}

.session-timer-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(233, 83, 13, 0.5);
  animation: session-timer-pulse 2s ease-in-out infinite;
}

@keyframes session-timer-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(233, 83, 13, 0.45);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(233, 83, 13, 0);
  }
}

.session-timer--paused .session-timer-dot {
  background: var(--text-muted);
  animation: none;
  box-shadow: none;
}

.session-timer-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

#session-timer-value {
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 700;
  color: var(--orange);
  min-width: 3.5ch;
  margin-left: auto;
}

.session-timer-pause {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  margin-left: 4px;
  padding: 0;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.session-timer-pause:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.session-timer-pause:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.session-timer--paused .session-timer-pause {
  border-color: var(--orange);
  color: var(--orange);
  background: var(--orange-dim);
}

.session-timer--resume {
  cursor: pointer;
  border-color: var(--orange);
  background: var(--orange-dim);
}

.session-timer--resume .session-timer-label {
  color: var(--orange);
}

.session-timer--resume .session-timer-grip {
  cursor: grab;
}

.session-timer--floating #session-timer-value {
  margin-left: 0;
}

#session-panel-footer .session-home-btn {
  margin-top: 0;
}

@media (max-width: 600px) {
  .session-timer-label {
    display: none;
  }

  #session-timer-value {
    font-size: 14px;
  }
}
