:root {
  --fond: #f5f6f0;
  --fond-carte: #fdfcf9;
  --encre: #22322c;
  --encre-douce: #4b5a53;
  --trait: #dcdcd0;
  --accent: #3e6259;
  --accent-clair: #eaf0ec;
  --ocre: #b8875a;
  --ocre-clair: #f5ece2;
  --rayon: 6px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: "Karla", sans-serif;
  font-size: 17px;
  line-height: 1.5;
}

h1, h2 {
  font-family: "Newsreader", serif;
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

/* En-tête */

.site-header {
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--trait);
}

.kicker {
  color: var(--ocre);
  font-family: "Karla", sans-serif;
  font-weight: 600;
  margin: 0 0 12px;
}

.site-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  max-width: 20ch;
}

.lede {
  max-width: 60ch;
  color: var(--encre-douce);
  font-size: 1.05rem;
}

/* Contrôles de recherche */

.controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 40px 0 8px;
}

#recherche, #filtre-ville, #filtre-type {
  font-family: "Karla", sans-serif;
  font-size: 1rem;
  padding: 10px 14px;
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  background: var(--fond-carte);
  color: var(--encre);
}

#recherche {
  flex: 1 1 260px;
}

#recherche:focus, #filtre-ville:focus, #filtre-type:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.compteur {
  color: var(--encre-douce);
  font-size: 0.9rem;
  margin: 0 0 24px;
}

/* Grille de fiches */

.grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  padding-bottom: 24px;
}

.fiche {
  background: var(--fond-carte);
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fiche .type {
  align-self: flex-start;
  background: var(--ocre-clair);
  color: var(--ocre);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}

.fiche h3 {
  font-family: "Newsreader", serif;
  font-size: 1.25rem;
  margin: 0;
}

.fiche .ville {
  color: var(--encre-douce);
  font-size: 0.95rem;
  margin: -6px 0 0;
}

.fiche .description {
  font-size: 0.95rem;
  color: var(--encre-douce);
  flex-grow: 1;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  background: var(--accent-clair);
  color: var(--accent);
  font-size: 0.8rem;
  padding: 3px 10px;
  border-radius: 999px;
}

.fiche-liens {
  display: flex;
  gap: 14px;
  font-size: 0.9rem;
  margin-top: 4px;
}

.fiche-liens a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.fiche-liens a:hover, .fiche-liens a:focus {
  border-bottom-color: var(--accent);
}

.etat-vide {
  color: var(--encre-douce);
  padding: 40px 0;
  text-align: center;
}

/* Suggestion */

.suggestion {
  background: var(--accent-clair);
  border-radius: var(--rayon);
  padding: 36px 24px;
  margin: 24px auto 56px;
  text-align: center;
}

.suggestion h2 {
  font-size: 1.4rem;
}

.bouton {
  display: inline-block;
  margin-top: 8px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 10px 22px;
  border-radius: var(--rayon);
  font-weight: 600;
}

.bouton:hover, .bouton:focus {
  background: #33504a;
}

/* Pied de page */

.site-footer {
  color: var(--encre-douce);
  font-size: 0.85rem;
  text-align: center;
  padding: 32px 24px 48px;
}

.site-footer a {
  color: var(--encre-douce);
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
