/* ----- Reset & Base ----- */
body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f4f6f9;
  color: #333;
  line-height: 1.6;
}
h1, h2 {
  text-align: center;
  color: #2c3e50;
}
h1 {
  margin-top: 1rem;
}
p {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
  text-align: justify;
}

/* ----- Introduction ----- */
.intro {
  background: #fff;
  padding: 1.5rem;
  margin: 1rem auto;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  text-align: center;
  max-width: 900px;
}

/* ----- Formulaire ----- */
form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  background: #fff;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin: 1.5rem auto;
  max-width: 800px;
}
label {
  display: flex;
  flex-direction: column;
  font-weight: bold;
  color: #34495e;
}
select, input {
  margin-top: 0.3rem;
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1rem;
}
button {
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: 8px;
  background: #27ae60;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
  align-self: flex-end;
}
button:hover {
  background: #219150;
}

/* ----- Messages ----- */
#message {
  text-align: center;
  margin-top: 1rem;
  font-weight: bold;
}
.loading { color: #2980b9; }
.error { color: #c0392b; }

/* ----- Carte (Leaflet) ----- */
#map {
  height: 400px;
  width: 90%;
  max-width: 900px;
  margin: 2rem auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ----- Résultats en desktop : grille ----- */
#results {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  padding: 1rem;
}
.card {
  background: #fff;
  border-radius: 12px;
  padding: 1rem 1.2rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
  background: #fafafa;
}
.card h3 {
  margin: 0 0 0.5rem;
  color: #2c3e50;
}
.card p {
  font-size: 0.95rem;
  color: #555;
}

/* ----- Responsive : mobile => 1 restaurant par ligne ----- */
@media (max-width: 600px) {
  form {
    flex-direction: column;
    align-items: stretch;
  }
  button {
    width: 100%;
  }
  #map {
    width: 95%;
    height: 300px;
  }
  #results {
    display: flex;
    flex-direction: column;
  }
  .card {
    width: 90%;
    margin: 0 auto 1rem;
  }
}
