/* ==========================================================================
   Tournée Affiches - Design System & Styles
   Mobile-first, moderne, contrasté, adapté au tableau de bord en voiture
   ========================================================================== */

:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: rgba(30, 41, 59, 0.85);
  --bg-glass: rgba(15, 23, 42, 0.75);
  --border-color: rgba(255, 255, 255, 0.12);
  --border-focus: #38bdf8;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-blue: #38bdf8;
  --accent-indigo: #6366f1;
  --accent-green: #10b981;
  --accent-green-hover: #059669;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px rgba(16, 185, 129, 0.35);

  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Header Navbar
   ========================================================================== */

.app-header {
  height: 60px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 1000;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: #fff;
}

.brand-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #10b981, #0284c7);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-city {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.btn-icon {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--accent-blue);
}

/* ==========================================================================
   Layout Principal (Carte + Panneaux)
   ========================================================================== */

.app-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
}

#map-container {
  flex: 1;
  height: 100%;
  width: 100%;
  z-index: 10;
  background: #111827;
}

/* Volet Latéral / Bottom Sheet (Option 1 - Blanc Pur Givré) */
.side-panel {
  position: absolute;
  top: 16px;
  left: 16px;
  bottom: 16px;
  width: 400px;
  max-width: calc(100vw - 32px);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25), 0 2px 6px rgba(0, 0, 0, 0.08);
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  overflow: hidden;
  color: #0f172a;
}

.side-panel.collapsed {
  transform: translateX(calc(-100% - 24px));
  pointer-events: none;
}

.side-panel.collapsed #btn-modify-config,
.side-panel.collapsed #btn-clear-address {
  display: none !important;
}

/* Poignée flottante tactile au bas de l'écran (▲ Détails tournée et démarrage ▲) */
.bottom-sheet-handle {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 95;
  background: rgba(15, 23, 42, 0.90);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(56, 189, 248, 0.6);
  color: #fff;
  border-radius: var(--radius-full);
  padding: 12px 24px;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65), 0 0 20px rgba(56, 189, 248, 0.3);
  cursor: pointer;
  display: none; /* Affiché via JS ou quand .side-panel.collapsed */
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  max-width: 92vw;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.2s ease, box-shadow 0.2s ease;
  animation: pulse-handle 2.5s ease-in-out infinite alternate;
}

@keyframes pulse-handle {
  0% { transform: translateX(-50%) translateY(0); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65), 0 0 15px rgba(56, 189, 248, 0.25); }
  100% { transform: translateX(-50%) translateY(-5px); box-shadow: 0 14px 35px rgba(0, 0, 0, 0.75), 0 0 25px rgba(56, 189, 248, 0.5); }
}

.bottom-sheet-handle:hover {
  background: rgba(30, 41, 59, 0.98);
  border-color: #38bdf8;
}

.bottom-sheet-handle:active {
  transform: translateX(-50%) scale(0.96);
}

/* Affichage automatique quand le volet est fermé */
.side-panel.collapsed ~ .bottom-sheet-handle {
  display: flex;
}

/* Masquage quand le guidage est actif */
.guidance-overlay[style*="display: flex"] ~ .bottom-sheet-handle:not(.guidance-sheet-handle) {
  display: none !important;
}

/* Barre d'affordance de rabattement (tirette 50% en haut du volet) */
.sheet-pull-handle {
  width: 100%;
  padding: 10px 0 6px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  touch-action: pan-y;
  background: transparent;
}

.sheet-pull-bar {
  width: 50%;
  height: 5px;
  background: #cbd5e1;
  border-radius: var(--radius-full);
  transition: background 0.2s ease, transform 0.2s ease;
}

.sheet-pull-handle:hover .sheet-pull-bar {
  background: var(--accent-blue);
  transform: scaleY(1.3);
}

/* Animation d'affordance Peek & Bounce (invitation physique au glissement au calcul) */
.side-panel.peek-bounce {
  animation: peek-bounce-desktop 1.2s cubic-bezier(0.34, 1.3, 0.64, 1) both;
}

/* Pulsation de couleur récurrente : toutes les 10 secondes pendant 3 secondes */
.side-panel.review-active .sheet-pull-bar,
.side-panel:has(#step-review:not([style*="display: none"])) .sheet-pull-bar {
  animation: pull-bar-cycle 10s ease-in-out infinite;
}

@keyframes peek-bounce-desktop {
  0% { transform: translateX(0); }
  25% { transform: translateX(-55px); }
  55% { transform: translateX(6px); }
  75% { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}

@keyframes pull-bar-cycle {
  0% {
    background: #cbd5e1;
    transform: scale(1);
    box-shadow: none;
  }
  7% {
    background: var(--accent-blue);
    transform: scale(1.25);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.85);
  }
  15% {
    background: #38bdf8;
    transform: scale(1.1);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
  }
  22% {
    background: var(--accent-blue);
    transform: scale(1.25);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.85);
  }
  30% {
    background: #cbd5e1;
    transform: scale(1);
    box-shadow: none;
  }
  100% {
    background: #cbd5e1;
    transform: scale(1);
    box-shadow: none;
  }
}

/* Bouton Retour */
.btn-back {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 7px 15px 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  user-select: none;
}

.btn-back:hover {
  background: rgba(2, 132, 199, 0.1);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  transform: translateX(-2px);
}

.btn-back-chevron {
  display: inline-block;
  flex-shrink: 0;
  color: var(--accent-blue);
  transition: transform 0.2s ease;
}

.btn-back:hover .btn-back-chevron {
  transform: translateX(-3px);
}

.panel-header,
.panel-header-review {
  padding: 0 0 12px 0;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
}

.panel-header h2 {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0;
  color: #0f172a;
}

.panel-header-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.2));
  display: block;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.2s ease;
}

.panel-header-logo:hover {
  transform: scale(1.1);
  filter: drop-shadow(0 4px 10px rgba(2, 132, 199, 0.4));
}

.panel-header-logo:active {
  transform: scale(0.96);
}

.panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ==========================================================================
   Formulaires & Champs de Configuration
   ========================================================================== */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-select,
.form-input {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-md);
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 12px 14px;
  outline: none;
  width: 100%;
  transition: var(--transition);
}

.form-select:focus,
.form-input:focus {
  background: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.form-select option {
  background: #ffffff;
  color: #0f172a;
}

/* Sélecteur multi-villes */
.city-multiselect-group {
  position: relative;
}

.city-multiselect-wrapper {
  position: relative;
  width: 100%;
}

.city-multiselect-trigger {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-md);
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 14px;
  outline: none;
  width: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  transition: var(--transition);
}

.city-multiselect-trigger:hover,
.city-multiselect-trigger:focus,
.city-multiselect-trigger.active {
  background: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.city-trigger-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.city-trigger-chevron {
  font-size: 0.9rem;
  color: #64748b;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.city-multiselect-trigger.active .city-trigger-chevron {
  transform: rotate(180deg);
  color: #0284c7;
}

/* Volet déroulant / Popover multi-communes */
.cities-popover {
  margin-top: 6px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: fadeInDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cities-popover-search {
  position: relative;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.cities-search-input {
  width: 100%;
  padding: 8px 34px 8px 12px;
  font-size: 0.9rem;
  font-family: inherit;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-sm);
  outline: none;
  background: #ffffff;
  color: #0f172a;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.cities-search-input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}

.btn-clear-cities-search {
  position: absolute;
  right: 20px;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: color 0.15s ease;
}

.btn-clear-cities-search:hover {
  color: #0f172a;
}

.cities-popover-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 6px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.8rem;
}

.btn-popover-action {
  background: none;
  border: none;
  color: #0284c7;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 4px;
  font-size: 0.8rem;
  border-radius: 4px;
}

.btn-popover-action:hover {
  background: rgba(2, 132, 199, 0.1);
  text-decoration: underline;
}

.popover-action-sep {
  color: #cbd5e1;
}

.cities-checkboxes-list {
  max-height: 230px;
  overflow-y: auto;
  padding: 4px 0;
  scrollbar-width: thin;
}

.city-checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
  transition: background 0.15s ease;
  user-select: none;
  border-bottom: 1px solid #f1f5f9;
}

.city-checkbox-item:last-child {
  border-bottom: none;
}

.city-checkbox-item:hover {
  background: #f0f9ff;
}

.city-checkbox-item.checked {
  background: #f0fdf4;
}

.city-checkbox-input {
  width: 18px;
  height: 18px;
  accent-color: #0284c7;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}

.city-checkbox-label {
  flex: 1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.city-checkbox-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: #0f172a;
}

.city-checkbox-count {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 500;
}

.city-checkbox-dept {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  background: #e2e8f0;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.cities-popover-footer {
  padding: 10px 12px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

/* Options sélecteur de quantité */
.count-max-hint {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
}

.count-pills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.count-pill-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #334155;
  border-radius: var(--radius-sm);
  padding: 10px 0;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
}

.count-pill-btn:hover:not(:disabled) {
  background: #e2e8f0;
  color: #0f172a;
}

.count-pill-btn.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}

.count-pill-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

/* Stepper de sélection fine (+ / -) */
.count-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 8px 12px;
}

.btn-stepper {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  touch-action: manipulation;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn-stepper:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: #0284c7;
  color: #0284c7;
  transform: translateY(-1px);
}

.btn-stepper:active:not(:disabled) {
  transform: scale(0.94);
}

.btn-stepper:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}

.stepper-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 90px;
}

.stepper-input {
  width: 80px;
  text-align: center;
  font-size: 1.45rem;
  font-weight: 800;
  color: #0284c7;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 2px 0;
  transition: var(--transition);
}

.stepper-input:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.stepper-input:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

/* Retrait des flèches natives sur les champs number */
.stepper-input::-webkit-outer-spin-button,
.stepper-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.stepper-input[type=number] {
  -moz-appearance: textfield;
}

.stepper-label {
  font-size: 0.7rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* Barre de recherche d'adresse avec autocomplétion */
.address-input-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
}

.address-row {
  display: flex;
  gap: 8px;
}

.btn-gps {
  background: rgba(2, 132, 199, 0.1);
  border: 1.5px solid rgba(2, 132, 199, 0.35);
  color: #0284c7;
  border-radius: var(--radius-md);
  padding: 0 14px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: var(--transition);
}

.btn-gps:hover {
  background: #0284c7;
  color: #fff;
}

.address-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  max-height: 220px;
  overflow-y: auto;
  z-index: 500;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  display: none;
}

.suggestion-item {
  padding: 10px 14px;
  font-size: 0.88rem;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  color: #0f172a;
  display: flex;
  flex-direction: column;
}

.suggestion-item:hover {
  background: #f1f5f9;
}

.suggestion-item small {
  color: #64748b;
  font-size: 0.78rem;
}

/* Bouton principal de génération */
.btn-primary {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.35);
  transition: var(--transition);
  width: 100%;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.45);
}

.btn-primary:active {
  transform: translateY(1px);
}

/* ==========================================================================
   Écran Bilan & Ajustement de Tournée
   ========================================================================== */

.route-summary-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
  gap: 8px;
}

.stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 52px;
}

.stat-box-centered {
  justify-content: center;
  align-items: center;
}

.stat-box .stat-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0284c7;
  line-height: 1.2;
}

.stat-box .stat-label {
  font-size: 0.72rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 700;
  line-height: 1.2;
}

.route-actions-bar {
  display: flex;
  gap: 8px;
}

.btn-secondary {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: #e2e8f0;
}

/* Liste des panneaux sélectionnés */
.panels-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 440px;
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}

.panel-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.panel-item:hover {
  border-color: #0284c7;
  background: #f8fafc;
}

.panel-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.panel-num-badge {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: #0284c7;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.panel-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-info-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.panel-info-sub {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
}

.btn-remove-panel {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: var(--transition);
}

.btn-remove-panel:hover {
  color: var(--accent-red);
  background: rgba(239, 68, 68, 0.1);
}

/* ==========================================================================
   Mode Guidage Embarqué (Spécial Voiture / Plein Écran)
   ========================================================================== */

.guidance-overlay {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 520px;
  z-index: 500;
  display: none;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.25s ease;
}

.guidance-overlay.collapsed {
  transform: translateX(-50%) translateY(calc(100% + 40px));
  opacity: 0;
  pointer-events: none;
}

/* Poignée de rabattement en haut de la carte de guidage */
.guidance-pull-handle {
  width: 100%;
  padding: 0 0 10px 0;
  margin-top: -6px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  touch-action: pan-y;
}

.guidance-pull-handle .sheet-pull-bar {
  background: rgba(255, 255, 255, 0.35);
  transition: background 0.2s ease, transform 0.2s ease;
}

.guidance-pull-handle:hover .sheet-pull-bar {
  background: var(--accent-blue);
  transform: scaleY(1.3);
}

.btn-minimize-guidance {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: #38bdf8;
  border-radius: var(--radius-md);
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.btn-minimize-guidance:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #ffffff;
}

/* Poignée tactile flottante de réouverture du guidage */
.guidance-sheet-handle {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 510;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 2px solid #10b981;
  border-radius: var(--radius-full);
  color: #ffffff;
  padding: 12px 24px;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65), 0 0 20px rgba(16, 185, 129, 0.35);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  max-width: 92vw;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.2s ease, box-shadow 0.2s ease;
  animation: pulse-guidance-handle 2.5s ease-in-out infinite alternate;
}

@keyframes pulse-guidance-handle {
  0% {
    transform: translateX(-50%) translateY(0);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65), 0 0 15px rgba(16, 185, 129, 0.25);
  }
  100% {
    transform: translateX(-50%) translateY(-5px);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.75), 0 0 25px rgba(16, 185, 129, 0.55);
  }
}

.guidance-sheet-handle:hover {
  background: rgba(30, 41, 59, 0.98);
  border-color: #34d399;
}

.guidance-sheet-handle:active {
  transform: translateX(-50%) scale(0.96);
}

.guidance-card {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 2px solid var(--accent-blue);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(56, 189, 248, 0.2);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.guidance-step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.step-indicator {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent-blue);
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #10b981);
  width: 10%;
  transition: width 0.4s ease;
}

.target-address-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.target-address {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
}

.target-notes {
  font-size: 0.9rem;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  display: inline-block;
}

/* Boutons géants de guidage */
.nav-action-wrapper {
  display: flex;
  gap: 8px;
  align-items: stretch;
  width: 100%;
}

.btn-nav-main {
  flex: 1;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 16px 18px;
  font-size: 1.12rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4);
  transition: var(--transition);
  text-decoration: none;
  min-height: 54px;
}

.btn-nav-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(2, 132, 199, 0.55);
  color: #fff;
}

.btn-nav-main:active {
  transform: scale(0.98);
}

.btn-nav-settings {
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  padding: 0 14px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: all 0.2s ease;
  flex-shrink: 0;
  min-width: 58px;
}

.btn-nav-settings:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
}

.nav-settings-label {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Modale Choix du GPS */
.gps-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gps-option-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
}

.gps-option-btn:hover {
  background: rgba(2, 132, 199, 0.12);
  border-color: #0284c7;
  transform: translateY(-1px);
}

.gps-option-btn.selected {
  background: rgba(2, 132, 199, 0.22);
  border-color: #38bdf8;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.3);
}

.gps-option-icon {
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.gps-option-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gps-option-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gps-option-title {
  font-weight: 700;
  font-size: 1rem;
  color: #ffffff;
}

.gps-option-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.gps-option-badge {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  font-weight: 700;
}

.gps-option-badge.current {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.btn-pasted-giant {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 18px;
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
  transition: var(--transition);
}

.btn-pasted-giant:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.7);
}

.btn-pasted-giant:active {
  transform: scale(0.98);
}

.btn-panel-not-found {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  text-align: center;
}

.btn-panel-not-found:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.6);
  color: #fef08a;
  transform: translateY(-1px);
}

.btn-panel-not-found:active {
  transform: scale(0.98);
}

.quick-reasons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 4px;
}

.chip-reason {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chip-reason:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.chip-reason.active {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #0f172a;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.textarea-comment {
  width: 100%;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.88rem;
  padding: 10px 12px;
  resize: vertical;
  min-height: 70px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s;
}

.textarea-comment:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
}

.btn-warning-action {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
  transition: var(--transition);
}

.btn-warning-action:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-warning-action:active {
  transform: scale(0.98);
}

.btn-exit-guidance {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  padding: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.btn-exit-guidance:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   Modales (Admin, Fin de Tournée, etc.)
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.active {
  display: flex;
}

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

.btn-close {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.btn-close:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #e2e8f0;
}

.btn-close:active {
  transform: scale(0.94);
  background: #e2e8f0;
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Modal fin de tournée félicitations */
.congrats-img-wrapper {
  margin-bottom: 20px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #000;
}

.congrats-img {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  object-position: center 25%;
  display: block;
}

.congrats-icon {
  font-size: 3.5rem;
  text-align: center;
  margin-bottom: 8px;
}

.congrats-stats {
  background: rgba(15, 23, 42, 0.6);
  border-radius: var(--radius-md);
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
  gap: 10px;
}

/* Bouton Sauvegarder et Partager */
.btn-save-tour {
  width: 100%;
  height: 48px;
  min-height: 48px;
  margin-bottom: 10px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #059669;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0 16px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-sizing: border-box;
  transition: var(--transition);
}

.btn-save-tour:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(16, 185, 129, 0.6);
  color: #047857;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.btn-save-tour .share-icon-svg {
  margin-left: 2px;
  flex-shrink: 0;
  stroke: currentColor;
}

#btn-start-guidance {
  height: 48px;
  min-height: 48px;
  padding: 0 16px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

/* Modal Sauvegarde et Partage */
.modal-share-card {
  max-width: 480px;
}

.share-tour-summary {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
  gap: 6px;
}

.share-summary-item {
  display: flex;
  flex-direction: column;
}

.share-summary-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.share-summary-lbl {
  font-size: 0.72rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.share-qr-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
  margin: 0 auto;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.share-qrcode-container {
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-qrcode-container img,
.share-qrcode-container canvas,
.share-qrcode-container svg {
  display: block;
  max-width: 100%;
  height: auto;
}

.share-qr-caption {
  margin-top: 8px;
  font-size: 0.75rem;
  color: #64748b;
  text-align: center;
  max-width: 250px;
  line-height: 1.35;
}

.share-link-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.share-link-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.share-link-input-row {
  display: flex;
  gap: 8px;
}

.share-tour-url-input {
  flex: 1;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: #0f172a;
  font-size: 0.82rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.share-tour-url-input:focus {
  border-color: var(--accent-blue);
  outline: none;
}

.btn-copy-tour {
  padding: 10px 16px;
  font-size: 0.88rem;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.share-copy-status {
  font-size: 0.82rem;
  color: #10b981;
  font-weight: 600;
  min-height: 18px;
  transition: opacity 0.2s ease;
}

.share-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.share-action-btn {
  padding: 12px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}

.share-email-link {
  text-decoration: none;
  color: #0f172a;
  text-align: center;
}

.share-email-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.share-email-buttons > #btn-email-share {
  width: 100%;
}

/* Bouton Gmail Web masqué par défaut sur tous les appareils tactiles (smartphones et tablettes) */
.share-btn-gmail {
  display: none !important;
}

/* Affiché exclusivement sur les vrais ordinateurs (PC / Mac avec souris ou trackpad précis) */
@media (hover: hover) and (pointer: fine) {
  .share-btn-gmail {
    display: inline-flex !important;
  }
  .share-email-buttons {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
  }
  .share-email-buttons > #btn-email-share {
    width: auto !important;
  }
}

/* Toast de confirmation de chargement de tournée */
.toast-banner {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #0f172a;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-full);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(16, 185, 129, 0.4);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast-banner.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   Marqueurs Leaflet Personnalisés
   ========================================================================== */

.marker-start {
  background: #10b981;
  color: #fff;
  border: 2px solid #fff;
  border-radius: var(--radius-full);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.6);
}

.marker-panel-active {
  background: #0284c7;
  color: #fff;
  border: 2px solid #fff;
  border-radius: var(--radius-full);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.6);
  transition: transform 0.2s ease;
}

.marker-panel-target {
  background: #f59e0b !important;
  border: 3px solid #fff;
  width: 38px;
  height: 38px;
  font-size: 1.1rem;
  animation: pulse-target 1.5s infinite;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.8);
}

@keyframes pulse-target {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.marker-panel-completed {
  background: #10b981 !important;
  opacity: 0.75;
}

.marker-panel-unused {
  background: #475569;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-full);
  width: 14px;
  height: 14px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  opacity: 0.7;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.marker-panel-unused:hover {
  transform: scale(1.6);
  background: #38bdf8;
  opacity: 1;
}

/* ==========================================================================
   Responsive Mobile
   ========================================================================== */

@media (max-width: 640px) {
  .side-panel {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    max-height: 75vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border-bottom: none;
    transform: translateY(0);
  }

  .side-panel.collapsed {
    transform: translateY(100%);
    pointer-events: none;
  }

  .side-panel.peek-bounce {
    animation: peek-bounce-mobile 1.2s cubic-bezier(0.34, 1.3, 0.64, 1) both;
  }

  @keyframes peek-bounce-mobile {
    0% { transform: translateY(0); }
    25% { transform: translateY(70px); }
    55% { transform: translateY(-10px); }
    75% { transform: translateY(4px); }
    100% { transform: translateY(0); }
  }

  .side-panel.collapsed #btn-modify-config,
  .side-panel.collapsed #btn-clear-address {
    display: none !important;
  }

  .panels-list {
    max-height: 42vh;
  }

  .guidance-overlay {
    bottom: 12px;
    width: 95%;
  }

  .target-address {
    font-size: 1.15rem;
  }

  .btn-pasted-giant {
    padding: 16px;
    font-size: 1.15rem;
  }
}
