/* Layout styles - Structure générale de l'application */

.psu-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.psu-header {
  background: white;
  border-bottom: 1px solid #e0e0e0;
  padding: 0.75rem 1.25rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.psu-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.psu-logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--psu-blue);
  text-decoration: none;
}

.psu-nav {
  display: flex;
  gap: 1rem;
}

.psu-nav a {
  color: var(--psu-blue);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.psu-nav a:hover,
.psu-nav a.active {
  color: var(--psu-blue);
  text-decoration: underline;
}

.psu-nav-counter {
  background: var(--psu-red);
  color: white;
  font-size: 0.75rem;
  padding: 0.2rem 0.4rem;
  border-radius: 10px;
  margin-left: 0.5rem;
}

.psu-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  min-height: calc(100vh - 200px);
}

.psu-footer {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
  font-size: 0.85rem;
  color: var(--psu-muted);
  text-align: center;
}

.psu-footer a {
  color: var(--psu-muted);
}

.psu-panel {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.psu-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f0f0f0;
}

.psu-panel-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
}

.psu-panel-actions {
  display: flex;
  gap: 0.5rem;
}

.psu-grid {
  display: grid;
  gap: 1.5rem;
}

.psu-grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.psu-grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.psu-grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.psu-flex {
  display: flex;
}

.psu-flex-between {
  justify-content: space-between;
}

.psu-flex-center {
  justify-content: center;
}

.psu-flex-end {
  justify-content: flex-end;
}

.psu-flex-wrap {
  flex-wrap: wrap;
}

.psu-flex-column {
  flex-direction: column;
}

.psu-gap-1 { gap: 0.5rem; }
.psu-gap-2 { gap: 1rem; }
.psu-gap-3 { gap: 1.5rem; }
.psu-gap-4 { gap: 2rem; }

/* Responsive */
@media (max-width: 768px) {
  .psu-container {
    padding: 0 0.5rem;
  }
  
  .psu-header-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .psu-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  
  .psu-main {
    padding: 1rem 0;
  }
  
  .psu-panel {
    padding: 1rem;
  }
  
  .psu-panel-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .psu-grid-2,
  .psu-grid-3,
  .psu-grid-4 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .psu-logo {
    font-size: 1.25rem;
  }
  
  .psu-nav {
    font-size: 0.9rem;
  }
  
  .psu-panel {
    padding: 0.75rem;
  }
}

/* Styles pour la carte Leaflet */
.psu-map {
  height: 400px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e0e0e0;
  margin: 1rem 0;
}

.psu-map-container {
  height: 400px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e0e0e0;
  margin: 1rem 0;
}

.psu-map-container.leaflet-container {
  background: #f5f5f5;
}

/* Conteneur de la carte dans les résultats de recherche */
.psu-search-map {
  height: 300px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #e0e0e0;
  margin-top: 1rem;
}

/* Styles pour les popups de la carte */
.leaflet-popup-content-wrapper {
  border-radius: 6px;
}

.leaflet-popup-content {
  margin: 8px 12px;
  line-height: 1.4;
}

.leaflet-popup-content h4 {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.leaflet-popup-content p {
  margin: 4px 0;
  font-size: 12px;
  color: #666;
}

.leaflet-popup-content a {
  color: var(--psu-blue);
  font-weight: 500;
}

.leaflet-popup-content a:hover {
  text-decoration: underline;
}

/* Marqueurs personnalisés */
.psu-map-marker {
  background: var(--psu-blue);
  border: 2px solid white;
  border-radius: 50%;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  margin-top: -6px;
}

.psu-map-marker:hover {
  background: #0d47a1;
  transform: scale(1.2);
}

/* Contrôles de la carte */
.leaflet-control {
  border-radius: 4px;
}

.leaflet-control-zoom {
  border: 1px solid #ccc;
  background: white;
}

.leaflet-control-zoom a {
  color: #333;
  font-weight: bold;
  text-decoration: none;
  display: block;
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
}

.leaflet-control-zoom a:hover {
  background: #f4f4f4;
}

/* Responsive pour la carte */
@media (max-width: 768px) {
  .psu-map {
    height: 300px;
  }
  
  .psu-map-container {
    height: 300px;
  }
  
  .psu-search-map {
    height: 250px;
  }
}

@media (max-width: 480px) {
  .psu-map {
    height: 250px;
  }
  
  .psu-map-container {
    height: 250px;
  }
  
  .psu-search-map {
    height: 200px;
  }
  
  .leaflet-popup-content {
    font-size: 11px;
  }
  
  .leaflet-popup-content h4 {
    font-size: 13px;
  }
}
