* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, system-ui, sans-serif;
  background: #fafafa;
  color: #1a1a1a;
}

.top-bar {
  padding: 16px;
  border-bottom: 1px solid #eee;
}

.top-bar h1 {
  font-size: 18px;
  font-weight: 500;
}

#app {
  position: relative;
  min-height: 100vh;
  padding-bottom: 80px;
}

.top-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #eee;
}

.icone-bouton {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #333;
}

.selecteur-lieu {
  flex: 1;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  background: #fafafa;
}

.recherche {
  padding: 12px 16px;
}

.recherche input {
  width: 100%;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  background: #fafafa;
}

.titre-section {
  font-size: 12px;
  font-weight: 500;
  color: #777;
  padding: 8px 16px 6px;
}

.mosaique-pieces {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 16px;
}

.carte-piece {
  background: #f5f5f5;
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.carte-piece .nom {
  font-size: 13px;
  font-weight: 500;
  margin-top: 6px;
}

.carte-piece .compte {
  font-size: 11px;
  color: #999;
  margin-top: 2px;
}

.carte-piece.ajouter {
  border: 1px dashed #ccc;
  background: transparent;
  color: #999;
  grid-column: 1 / -1;
}

.ligne-fiche {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid #f0f0f0;
}

.ligne-fiche .nom {
  font-size: 13px;
  font-weight: 500;
}

.ligne-fiche .detail {
  font-size: 11px;
  color: #999;
}

.bouton-flottant {
  position: fixed;
  right: 20px;
  bottom: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #1D9E75;
  color: white;
  font-size: 26px;
  border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  cursor: pointer;
}

.tiroir {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 240px;
  background: white;
  box-shadow: 2px 0 12px rgba(0,0,0,0.15);
  transform: translateX(-100%);
  transition: transform 0.2s ease;
  z-index: 20;
  padding: 16px;
}

.tiroir.ouvert {
  transform: translateX(0);
}

.tiroir-titre {
  font-size: 13px;
  font-weight: 500;
  color: #777;
  margin: 12px 0 8px;
}

.fond-tiroir {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 10;
  display: none;
}

.fond-tiroir.visible {
  display: block;
}
