*,
*::after,
*::before {
  box-sizing: border-box;
}

:root {
  --text-color: #090906;
  --background-color: #e1cdb3;
  --background-color-light: #e7e2dc;
  --link-color: #a67242;
  --box-color: #d5bb9b;
}

body {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
  background-color: var(--background-color);
}

header {
  /* width: 100%; */
  background-color: var(--background-color-light);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

footer {
  margin-top: auto;
  width: 100%;
  background-color: var(--background-color-light);
  padding: 20px 0;
  text-align: center;
}

footer p {
  margin: 0;
  color: var(--text-color);
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 10px;
}

.footer-links a {
  color: var(--link-color);
  text-decoration: none;
  font-weight: bold;
}

.footer-links a:hover {
  text-decoration: underline;
}
.links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;
}

nav {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-direction: row;
  padding: 1.5em 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 30px;
}
.logo-text {
  /* display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row; */
  font-size: 1.5rem;
  color: var(--text-color);
  font-weight: bold;
}
.text {
  font-size: 1.1rem;
  color: var(--text-color);
  font-weight: 500;
  margin-bottom: 20px;
  max-width: 1200px;
}

.logo img {
  width: 100px;
  display: block;
}

.links ul {
  display: flex;
  gap: 20px;
  list-style: none;
}

.links a {
  text-decoration: none;
  color: var(--link-color);
  font-size: 1.1rem;
  font-weight: bold;
  padding-bottom: 0.2em;
  background-image: linear-gradient(var(--link-color), var(--link-color));
  background-size: 0% 0.15em;
  background-position: bottom center;
  background-repeat: no-repeat;
  transition: background-size 0.3s ease-in-out;
}

.links a:hover {
  background-size: 100% 0.15em;
}

.choix {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 20px;
  background-color: var(--box-color);
  padding: 30px;
}

.grille-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  max-width: 1400px;
  margin: 30px auto;
  width: min(100%, 1400px);
}

h1 {
  color: var(--text-color);
  margin-bottom: 20px;
}
select {
  background-color: var(--link-color);
  color: var(--text-color);
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
}
.barre-recherche {
  display: flex;
  justify-content: center;
  margin: 40px 0;
}

.recherche {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--background-color-light);
  border: 3px solid var(--link-color);
  border-radius: 50px;
  padding: 8px 10px 8px 15px;
  width: 100%;
  max-width: 550px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.recherche:focus-within {
  box-shadow: 0 0 10px rgba(166, 114, 66, 0.5);
  transform: scale(1.02);
}

.recherche .material-symbols-outlined {
  color: var(--link-color);
  font-size: 24px;
}

.recherche input {
  border: none;
  outline: none;
  background: transparent;
  flex: 1;
  font-size: 1rem;
  color: var(--text-color);
}

.recherche input::placeholder {
  color: #8a6f54;
  transition: 0.3s;
}

.recherche input:focus::placeholder {
  opacity: 0.5;
}

.recherche button {
  background: var(--link-color);
  color: var(--text-color);
  border: none;
  padding: 10px 18px;
  border-radius: 30px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.recherche button:hover {
  background: #82532a;
  transform: translateY(-2px);
}

.recherche button:active {
  transform: scale(0.95);
}

/* TEST */
.ajout {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 40px 0;
}
.chocohome {
  min-height: 50vh;
  background-image: url(./image/ferrerohome.jpg);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  position: relative;
}
.text {
  font-size: 1.1rem;
  color: var(--text-color);
  font-weight: 500;
  margin-bottom: 20px;
  max-width: 1200px;
}
/* .contenu {
  padding: 30px;
  max-width: 1200px;
} */
.container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  max-width: 1800px;
  margin-inline: auto;
}
.container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}
.card {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  background: var(--box-color);
  padding: 30px;
  border-radius: 12px;
  width: 100%;
  max-width: 300px;
  border: 5px solid var(--link-color);
  margin: 15px;
  margin-top: 25px;
  align-items: center;
  justify-content: center;
  transition: 0.3s ease-in-out;
}
.card-image {
  width: 100%;
  height: 180px;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: #000000 0px 4px 8px -1px;
  object-fit: cover;
}
.card:hover {
  transform: scale(1.05);
}
.card {
  display: flex;
  flex-direction: column;
  padding: 15px;
  height: auto;
}

.card h3,
.card p {
  margin: 5px 0;
  position: static;
}
.h2 {
  display: flex;
  color: var(--text-color);
  margin: 0;
  font-size: 1.2rem;
  justify-content: center;
}
.p {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  flex-wrap: wrap;
}
/* FORMULAIRE */
.form {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  margin: 40px 0;
}

form {
  background: var(--box-color);
  padding: 30px;
  border-radius: 12px;
  width: 100%;
  max-width: 700px;
  border: var(--link-color) 5px solid;
  background-color: var(--box-color);
}

form h2 {
  text-align: center;
  color: var(--text-color);
  margin-bottom: 5px;
}
/* Messages formulaire */
.form-succes,
.form-erreur {
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem auto;
  max-width: 700px;
  text-align: center;
  font-weight: 600;
}

.form-succes {
  background: #d4edda;
  color: #155724;
  border: 2px solid #c3e6cb;
}

.form-erreur {
  background: #f8d7da;
  color: #721c24;
  border: 2px solid #f5c6cb;
}
.separation {
  width: 100%;
  height: 2px;
  background: var(--link-color);
  margin: 20px 0;
}

.corps-formulaire {
  display: flex;
  gap: 30px;
}

.gauche,
.droite {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

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

.boite label {
  font-weight: 600;
  color: #555;
  margin-bottom: 5px;
}

.boite input,
textarea {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 14px;
}

.boite input:focus,
textarea:focus {
  border-color: 5px solid var(--link-color);
  outline: none;
  box-shadow: 0 0 5px rgba(164, 113, 72, 0.3);
}
:focus {
  outline: none;
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid #000;
}

textarea {
  height: 100%;
  min-height: 150px;
  resize: vertical;
}

.pied-formulaire {
  margin-top: 30px;
  text-align: center;
}

button {
  padding: 12px 40px;
  border: none;
  background: var(--link-color);
  color: var(--text-color);
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: 0.3s ease-in-out;
}

button:hover {
  background: #82532a;
  transform: translateY(-2px);
}

/* RESPONSIVE */

@media screen and (max-width: 910px) {
  nav {
    flex-direction: column;
    gap: 20px;
  }

  @media screen and (min-width: 560px) {
    nav {
      flex-direction: column;
      gap: 20px;
    }

    .corps-formulaire {
      flex-direction: column;
    }

    .links ul {
      padding: 0;
    }
  }
  @media screen and (max-width: 500px) {
    .recherche {
      width: 80%;
    }
    .card {
      max-width: 100%;
    }
    .conteneur-chocolat,
    .tablette {
      visibility: hidden;
      visibility: collapse;
      display: none;
    }
  }
  @media screen and (max-width: 800px) {
    .choix {
      flex-direction: column;
    }
    .conteneur-chocolat,
    .tablette {
      visibility: hidden;
      visibility: collapse;
      display: none;
    }
    .form {
      flex-direction: column;
      width: 500px;
      display: flex;
      justify-content: center;
      align-items: center;
      width: auto;
    }
  }
}
.btn {
  background: var(--link-color);
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  outline: none;
  box-shadow: none;
  text-decoration: none;
  display: flex;
  max-width: 230px;
  justify-content: center;
  /* margin: 20px auto; */
  margin-top: 40px;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.btn:focus {
  outline: none;
}

/* SKIPLINK */

.a11y-nav {
  position: absolute;
  top: -10em;
  z-index: 100;
  width: 100%;
}
.a11y-nav a {
  background-color: white;
  color: var(--link-color);
  font-weight: 700;
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  padding: 0.5rem 0;
}

.a11y-nav a:focus,
.a11y-nav a:hover {
  top: 10em;
  text-decoration: none;
}

/* FOOTER */
/* footer {
  width: 100%;
  background-color: var(--background-color-light);
  color: var(--text-color);
  padding: 20px 0;
  text-align: center;
  border-top: 5px solid var(--link-color);
} */
html,
body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ton contenu principal */
main {
  flex: 1;
}

footer {
  width: 100%;
  background-color: var(--background-color-light);
  color: var(--text-color);
  padding: 20px 0;
  text-align: center;
  border-top: 5px solid var(--link-color);
}

footer p {
  font-weight: 600;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  text-decoration: none;
  color: #5c3d2e;
  font-weight: bold;
  padding: 10px 20px;
  border: 2px solid #5c3d2e;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  background-color: #5c3d2e;
  color: blanchedalmond;
}

.footer-links a.footer-bouton {
  background-color: #5c3d2e;
  color: blanchedalmond;
}
.footer-links a.footer-bouton:hover {
  background-color: transparent;
  color: #5c3d2e;
}
