/* =========================
   BASE
========================= */

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  background-color: #f7f2ea;
  color: #333333;
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: auto;
}


/* =========================
   ACCESSIBILITÉ CLAVIER
========================= */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #7a5c3a;
  outline-offset: 3px;
}


/* =========================
   HEADER
========================= */

header {
  background-color: #ffffff;
  border-bottom: 1px solid #d8cfc4;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.logo {
  margin: 0;
  color: #6b4d2e;
  font-size: 2rem;
}

nav {
  display: flex;
  align-items: center;
}

nav a {
  margin-left: 20px;
  padding: 5px 2px;
  text-decoration: none;
  color: #333333;
  font-weight: 600;
}

nav a:hover,
nav a:focus-visible {
  color: #6b4d2e;
  text-decoration: underline;
}

nav a.active {
  color: #6b4d2e;
  text-decoration: underline;
}


/* =========================
   TITRE DE PAGE
========================= */

.page-title {
  margin-top: 40px;
  margin-bottom: 30px;
}

.page-title h2 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 2rem;
  line-height: 1.2;
  color: #333333;
}

.muted {
  color: #595959;
}


/* =========================
   FILTRES
========================= */

.filters {
  background-color: #ffffff;
  padding: 25px;
  border: 1px solid #d8cfc4;
  border-radius: 10px;
  margin-bottom: 30px;
}

.filters h3 {
  margin-top: 0;
  font-size: 1.3rem;
}

.filters-form {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
}

.field label {
  margin-bottom: 6px;
  color: #333333;
  font-weight: 600;
}

.field input,
.field select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #767676;
  border-radius: 6px;
  background-color: #ffffff;
  color: #333333;
  font-family: Arial, sans-serif;
  font-size: 1rem;
}

.field input:hover,
.field select:hover {
  border-color: #6b4d2e;
}


/* =========================
   RÉSULTATS
========================= */

.results {
  margin-bottom: 50px;
}

#result-count {
  margin-bottom: 20px;
}


/* =========================
   CARTES MENUS
========================= */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  background-color: #ffffff;
  padding: 20px;
  border: 1px solid #d8cfc4;
  border-radius: 10px;
}

.card h3 {
  margin-top: 0;
  color: #6b4d2e;
  font-size: 1.35rem;
}

.description {
  line-height: 1.6;
}

.meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
  margin-bottom: 20px;
  font-weight: 600;
}


/* =========================
   BOUTONS / LIENS
========================= */

.btn-outline {
  display: inline-block;
  min-height: 44px;
  padding: 10px 15px;
  border: 2px solid #6b4d2e;
  border-radius: 6px;
  color: #6b4d2e;
  background-color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background-color: #6b4d2e;
  color: #ffffff;
  text-decoration: underline;
}


/* =========================
   FOOTER
========================= */

footer {
  background-color: #ffffff;
  border-top: 1px solid #d8cfc4;
  margin-top: 40px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding-top: 25px;
  padding-bottom: 25px;
}

footer p {
  margin-bottom: 0;
}

footer a {
  color: #6b4d2e;
  font-weight: 600;
  text-decoration: underline;
}

footer a:hover,
footer a:focus-visible {
  color: #4f381f;
}


/* =========================
   TABLETTE
========================= */

@media (max-width: 900px) {

  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .filters-form {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* =========================
   TABLETTE / MOBILE
========================= */

@media (max-width: 768px) {

  .header-content {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .logo {
    margin: 0;
  }

  nav {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  nav a {
    margin: 0;
    padding: 8px 10px;
  }

  .filters-form {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    gap: 15px;
    text-align: center;
    align-items: center;
  }
}


/* =========================
   MOBILE
========================= */

@media (max-width: 600px) {

  .cards {
    grid-template-columns: 1fr;
  }

  .meta {
    flex-direction: column;
  }
}


/* =========================
   PETITS ÉCRANS
========================= */

@media (max-width: 480px) {

  .container {
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
  }

  .header-content {
    padding-top: 15px;
    padding-bottom: 15px;
  }

  .logo {
    font-size: 1.6rem;
  }

  nav {
    gap: 4px;
  }

  nav a {
    padding: 8px;
    font-size: 1rem;
  }

  .page-title {
    margin-top: 25px;
    margin-bottom: 20px;
  }

  .page-title h2 {
    font-size: 1.7rem;
  }

  .filters {
    padding: 15px;
  }

  .card {
    padding: 15px;
  }

  .btn-outline {
    width: 100%;
  }
}