@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}
html, body {
  max-width: 100%;
  overflow-x: hidden;
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  overflow-x: auto;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

main {
  flex: 1;
  padding-top: 80px;
  padding-bottom: 20px;
}

nav {
  position: fixed;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: #242526;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

nav .wrapper {
  position: relative;
  max-width: 1300px;
  padding: 0 30px;
  height: 70px;
  line-height: 70px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wrapper .logo a {
  color: #f2f2f2;
  font-size: 30px;
  font-weight: 600;
  text-decoration: none;
}

.wrapper .nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin: 0 10px;
}

.nav-links li a {
  color: #f2f2f2;
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  padding: 9px 10px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.nav-links li a:hover {
  background: #3A3B3C;
}

.wrapper .btn {
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  display: none;
}

.wrapper .btn.close-btn {
  position: absolute;
  right: 30px;
  top: 20px;
}

.nav-links li a.active {
  color: #949494;
  font-weight: bold;
}

@media screen and (max-width: 576px) {
  .wrapper .btn {
    display: block;
    cursor: pointer;
    font-size: 24px;
    color: white;
  }

  .wrapper .nav-links {
    position: fixed;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(30, 31, 33, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: top 0.4s ease-in-out;
    opacity: 0;
    visibility: hidden;
  }

  .nav-links.active {
    top: 0;
    opacity: 1;
    visibility: visible;
  }

  .nav-links li {
    text-align: center;
    padding: 15px 0;
    width: 100%;
  }

  .nav-links li a {
    font-size: 24px;
    color: white;
    text-transform: uppercase;
    font-weight: bold;
    transition: color 0.3s;
  }

  .nav-links li a:hover {
    color: #00bcd4;
  }

  .wrapper .btn.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 30px;
    color: white;
    cursor: pointer;
  }
}


@media screen and (min-width: 577px) {
  .wrapper .btn {
    display: none;
  }
}

#menu-btn {
  display: none;
}

@media screen and (max-width: 576px) {
  .wrapper {
    padding: 0 15px;
  }

  .wrapper .btn {
    display: block;
    cursor: pointer;
  }

  .wrapper .nav-links {
    position: fixed;
    height: 100vh;
    width: 100%;
    max-width: 300px;
    top: 0;
    left: -100%;
    background: #1E1F21;
    display: flex;
    flex-direction: column;
    padding-top: 70px;
    transition: left 0.3s ease-in-out;
    box-shadow: 4px 0px 10px rgba(0, 0, 0, 0.3);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-links.active {
    left: 0;
  }

  .nav-links li {
    text-align: center;
    width: 100%;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links li a {
    display: block;
    font-size: 20px;
    color: #f2f2f2;
    text-transform: uppercase;
  }
}

.admin-header {
  background-color: #242526;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

.admin-header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  height: 70px;
}

.admin-header .logo img {
  height: 50px;
}

.admin-header nav a {
  color: #f2f2f2;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
}

@media screen and (max-width: 576px) {
  .admin-header nav {
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    padding: 10px;
  }

  .admin-header .logo img {
    height: 40px;
  }

  .admin-header nav a {
    margin-top: 10px;
    font-size: 18px;
  }
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 10px; 
}

.logo a {
    display: block;
    padding: 10px;
}

.logo img.apple-logo {
    width: 50px;
    height: auto;
    transition: filter 0.3s ease-in-out;
}

.logo a:hover img.apple-logo {
    filter: brightness(0);
}

.hero {
    width: 100vw;
    height: 40vh; 
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    margin-top: 70px; 
}

.hero img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
}

.container {
  flex: 1; 
  display: flex;
  flex-direction: column;
}

main {
  flex: 1; 
  padding-bottom: 20px;
}

footer {
  background: #242526;
  color: #f2f2f2;
  text-align: center;
  padding: 15px 0;
  margin-top: auto; 
  width: 100%;
}

footer a {
  color: #f2f2f2;
  text-decoration: none;
  margin: 0 10px;
}

footer a:hover {
  text-decoration: underline;
}
.table-container {
  display: flex;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 900px;
  margin: 30px auto;
  padding: 0 20px;
  overflow-x: auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
}

.table-container table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  background-color: #fff;
  border-radius: 8px;
  box-sizing: border-box;
}

th {
  background: #222;
  color: white;
  font-weight: bold;
  padding: 15px;
  text-align: center;
  white-space: nowrap;
  border: none;
}

td {
  padding: 12px;
  text-align: center;
  border-bottom: 1px solid #ddd;
  vertical-align: middle;
  word-wrap: break-word;
  overflow-wrap: break-word;
  border: none;
}

tr:nth-child(even) {
  background-color: #f9f9f9;
}

tr:hover {
  background-color: #f0f0f0;
  transition: background 0.3s ease;
}

td img {
  max-width: 60px;
  height: auto;
  border-radius: 4px;
}

.table-container::-webkit-scrollbar {
  height: 8px;
}
.table-container::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

@media screen and (max-width: 576px) {
  .table-container {
    padding: 10px;
    margin: 20px auto;
  }

  .table-container table {
    display: block;
    width: 100%;
    overflow-x: auto;
  }

  thead, tbody, tr, th, td {
    display: block;
    text-align: left;
  }

  th, td {
    padding: 10px;
    font-size: 14px;
  }

  td img {
    max-width: 40px;
  }

  .btn-action,
  .btn-apple button {
    font-size: 13px;
    padding: 6px 10px;
    margin: 3px;
  }
}

@media screen and (max-width: 360px) {
  .table-container {
    padding: 5px;
    margin: 15px auto;
  }

  th, td {
    padding: 8px;
    font-size: 12px;
  }

  td img {
    max-width: 35px;
  }

  .btn-action,
  .btn-apple button {
    font-size: 12px;
    padding: 5px 8px;
    margin: 2px;
  }
}


.btn-retour {
  text-align: right;
  margin-top: 10px;
}

.btn-retour button {
  padding: 10px 15px;
  background-color: #949494;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-left: 10px;
}

.btn-retour button:hover {
  background-color: #7A7A7A;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 250px);
  gap: 20px;
  justify-content: center;
  padding: 20px;
  max-width: calc(250px * 5 + 80px);
  margin: 0 auto;
  transition: transform 0.3s ease, box-shadow 0.8s ease;
}
.product {
  perspective: 1000px;
  width: 250px;
  height: 350px;
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}

.product:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
  z-index: 2;
}


.product-inner {
  width: 100%;
  height: 100%;
  position: absolute;
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

.product.flipped .product-inner {
  transform: rotateY(180deg);
}

.product-front, .product-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  background: white;
  overflow: hidden;
}


.product-front {
  background: white;
}

.product-back {
  background: #242526;
  color: white;
  transform: rotateY(180deg);
  text-align: center;
}

.product-img-container {
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f8f8f8;
  border-radius: 10px;
}

.product-img-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.btn-action {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn-edit {
  background-color: #000000;
  color: white;
}

.btn-edit:hover {
  background-color: #414242;
}

.btn-delete {
  background-color: #e53935;
  color: white;
}

.btn-delete:hover {
  background-color: #c62828;
}
.btn-add {
  display: inline-block;
  padding: 10px 20px;
  background-color: #d0d7ab;
  color: white;
  font-weight: bold;
  font-size: 15px;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
  margin: 10px 0;
}

.btn-add:hover {
  background-color: #000000;
  transform: scale(1.03);
}
.btn-apple {
  text-align: right;
  margin-top: 10px;
  margin-right: 10px;

}

.btn-apple button {
  padding: 10px 15px;
  background-color: #949494;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.btn-apple button:hover {
  background-color: #7A7A7A;
}
.hidden-select {
  position: absolute;
  left: -9999px;
  top: -9999px;
  height: 0;
  width: 0;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.admin-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  margin: 60px auto;
  max-width: 800px;
}

.admin-card {
  background-color: #f5f5f5;
  border-radius: 20px;
  padding: 30px;
  width: 280px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.admin-card:hover {
  transform: scale(1.05);
}

.admin-card button {
  background-color: #000;
  color: white;
  border: none;
  padding: 15px 25px;
  border-radius: 10px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.admin-card button:hover {
  background-color: #333;
}
.search-container {
  max-width: 500px;
  margin: 50px auto;
  text-align: center;
}

.search-container input[type="text"] {
  width: 100%;
  padding: 15px;
  border: 2px solid #ccc;
  border-radius: 30px;
  font-size: 1rem;
  margin-bottom: 20px;
}

.search-container button {
  padding: 12px 25px;
  font-size: 1rem;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.search-container .btn-search {
  background-color: #000;
  color: white;
  margin-right: 10px;
}

.search-container .btn-search:hover {
  background-color: #333;
}

.search-container .btn-retour {
  background-color: #ddd;
  color: #000;
}

.search-container .btn-retour:hover {
  background-color: #bbb;
}

.error-message {
  color: red;
  font-weight: bold;
  margin-top: 15px;
}
.form-container {
  max-width: 600px;
  margin: 40px auto;
  padding: 30px 25px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.form-container:hover {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.15);
}

.form-container h1 {
  font-size: 24px;
  margin-bottom: 10px;
  text-align: center;
  color: #222;
}

.form-container p {
  font-size: 15px;
  text-align: center;
  margin-bottom: 20px;
  color: #555;
}

.form-container form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-container input[type="text"],
.form-container input[type="file"],
.form-container select {
  padding: 12px 14px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 15px;
  transition: border-color 0.2s ease;
}

.form-container input[type="text"]:focus,
.form-container input[type="file"]:focus,
.form-container select:focus {
  border-color: #000;
  outline: none;
}

.form-container input[type="submit"],
.form-container .btn-apple button {
  background-color: #000;
  color: white;
  padding: 14px;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.form-container input[type="submit"]:hover,
.form-container .btn-apple button:hover {
  background-color: #333;
  transform: scale(1.02);
}

@media screen and (max-width: 576px) {
  .form-container {
    padding: 20px 15px;
    margin: 20px 15px;
  }

  .form-container h1 {
    font-size: 20px;
  }

  .form-container input[type="text"],
  .form-container select {
    font-size: 14px;
  }

  .form-container input[type="submit"],
  .form-container .btn-apple button {
    font-size: 15px;
    padding: 12px;
  }
}

.hidden {
  display: none;
}

.btn-apple {
  text-align: center;
  margin-top: 20px;
}
.success-message {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
  padding: 20px;
  border-radius: 8px;
  max-width: 500px;
  margin: 0 auto 30px auto;
}
.btn-retour {
  margin-top: 30px;
}
.btn-retourr {
  background-color: #222;
  color: white;
  padding: 12px 20px;
  text-decoration: none;
  border-radius: 8px;
  display: inline-block;
  font-weight: bold;
  transition: background-color 0.3s;
}
.btn-retourr:hover {
  background-color: #444;
}
.btn-container {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.btn-container button {
  background-color: #000;
  color: white;
  border: none;
  padding: 12px 25px;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
}
.btn-container button:hover {
  background-color: #c8c5c5;
}
main, .form-container, .content-admin {
  margin-top: 5px;
  margin: auto;
}
