* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

button {
  padding: 10px 22px;
  background: rgba(43, 37, 32, 0.6);
  border: 1px solid rgba(201, 168, 124, 0.3);
  border-radius: 6px;
  color: #c9a87c;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

button[data-active="true"] {
  background: rgba(201, 168, 124, 0.3);
  color: #f4e4d0;
  border-color: #c9a87c;
}

body {
  font-family: 'Arial', sans-serif;
  background: linear-gradient(135deg, #2b2520 0%, #1a1714 100%);
  color: #d4c5b9;
  padding-top: 70px;
  transition: all 0.4s ease;
}

header {
  text-align: center;
}

h1 {
  font-size: 36px;
  color: #c9a87c;
  margin-bottom: 5px;
  letter-spacing: 2px;
  font-weight: 600;
}

h2 {
  font-size: 16px;
  color: #a89584;
  font-weight: 300;
  letter-spacing: 1px;
  margin-bottom: 0;
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  padding: 12px 20px;
  background: rgba(43, 37, 32, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid rgba(201, 168, 124, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

#search[type="text"] {
  flex: 1;
  max-width: 400px;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(201, 168, 124, 0.3);
  border-radius: 6px;
  color: #d4c5b9;
  font-size: 10px;
  transition: all 0.3s;
  text-align: left;
  margin-bottom: auto;
}

#search[type="text"]::placeholder {
  color: rgba(212, 197, 185, 0.4);
}

#search[type="text"]:focus {
  outline: none;
  border-color: #c9a87c;
  background: rgba(0, 0, 0, 0.4);
}

button:hover {
  background: rgba(43, 37, 32, 0.8);
  border-color: #c9a87c;
  transform: translateY(-2px);
}

button:active {
  transform: translateY(0);
}

button[data-active="true"] {
  background: rgba(201, 168, 124, 0.3);
  color: #f4e4d0;
  border-color: #c9a87c;
}

section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

main {
  display: grid;
  grid-template-columns: repeat(auto-fill, 220px);
  gap: 25px;
  padding: 20px 0;
  justify-content: center;
  grid-auto-rows: auto;
}

article {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  overflow: hidden;
  border:  rgba(201, 168, 124, 0.2);
  width: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

article:hover {
  border-color: #c9a87c;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

img {
  width: 220px;
  height: auto;
  max-height: 60vh;
  object-fit: contain;
  display: block;
  opacity: 0.95;
}

.import {
  position: absolute;
  cursor: pointer;
  font-size: 25px;
  margin-top: -3px;
  margin-left: 160px;
}

.supprime {
  position: absolute;
  cursor: pointer;
  font-size: 25px;
  margin-top: -3px;
  margin-left: 187px;
}

.vide {
  font-size: 60px;
  margin: auto;
}

article:hover img {
  opacity: 1;
}

h3 {
  font-size: 18px;
  color: #c9a87c;
  font-weight: 600;
}

.sous-titre:first-of-type {
  color: #a89584;
  font-weight: 500;
  font-size: 10px;
}

span {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(201, 168, 124, 0.2);
  border: 1px solid rgba(201, 168, 124, 0.3);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  margin-top: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #c9a87c;
}

footer {
  text-align: center;
  padding: 60px 20px;
  color: rgba(212, 197, 185, 0.4);
  font-size: 18px;
  display: none;
}

footer[data-visible="true"] {
  display: block;
}

article div {
  width: 100%;
  display: flex;
  padding: 8px;
  flex-direction: column;
  justify-content: space-between;
}

article div div {
  display: flex;
  width: 100%;
  padding: 0px;
  flex-direction: row;
  align-items: center;
  margin-top: 5px;
}

.infos {
  margin-top: auto;
}

.titre {
  color: #c9a87c;
  font-size: 16px;
  line-height: 1.2em;
  max-height: 2.4em;
  margin: 0px;
  padding: 0px;
  overflow: hidden;
  max-width: 58%;
}

.input-image {
  color: #c9a87c;
  font-size: 16px;
  margin: 0px;
  padding: 0px;
  max-width: 70%;
  margin-top: 5px;
}

.tome {
  color: #c9a87c;
  font-size: 16px;
  line-height: 1.2em;
  margin: 0px;
  padding: 0px;
  line-height: 1.2em;
  margin-left: 5px;
  margin-right: 5px;
  max-width: 15%;
}

.sous-titre {
  color: #c9a87c;
  margin: 0px;
  margin-bottom: auto;
  padding: 0;
  white-space: nowrap;
  overflow: hidden;
  font-size: 10px;
  max-width: 90%;
  margin-top: 5px;
}

.mod {
  font-size: 10px;
  padding: 3px 8px;
  margin-top: auto;
  margin-bottom: auto;
  margin-left: auto;
}

article div div button {
  padding: 5px 5px;
  margin: 0px;
  font-size: 13px;
  max-width: 33%;
}

@media (max-width: 530px) {
  body {
    padding-top: 110px;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 16px;
  }

  nav {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 10px;
    padding: 10px;
  }

  #search[type="text"] {
    grid-row: 1;
    grid-column: 2 / 5;
    width: 100%;
    font-size: 16px;
    padding: 10px 15px;
  }

  main {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  article {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    height: 120px;
    border-radius: 8px;
    width: 100%;
  }

  img {
    width: auto;
    max-width: 25%;
  }

  article div {
    width: 75%;
  }

  article div div {
    width: 100%;
    margin-top: auto;
  }

}

nav div {
  grid-column: 1 / 3;
  grid-row: 2;
  display: grid;
  grid-template-rows: auto auto auto auto auto auto;
}

.add {
  grid-column: 4 / 6;
  grid-row: 2;
}

nav div button {
  display: none;
}

input {
  background-color: rgba(201, 168, 124, 0.15);
  border-radius: 7px;
  border: none;
  font-weight: 600;
  max-width: 0px;
  font-size: 16px !important;
}

.hidden {
  display: none;
}