/* ======== Style général ======== */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f7f7f7;
  color: black;
  margin: 0;
  padding: 0;
}

header {
  background: lightgray; //#222
  color: #fff;
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  margin: 0;
  font-size: 1.5rem;
}

header nav a {
  color: gray;
  text-decoration: none;
  margin-left: 15px;
  font-weight: bold;
}

header nav a:hover {
  color: red;
  text-decoration: underline;
}

main {
  padding: 20px 40px;
}

select option{
	width:100px;
}

/* ======== Produits ======== */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  object-fit: contain; /* Assure que toute l'image est visible */
  gap: 20px;
}

.product {
  background: #fff;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.product-img {
  width: 100%;
  height: auto; /* Important pour préserver le ratio */
  object-fit: contain; /* Assure que toute l'image est visible */
  border-radius: 5px;
}

.product h3 {
  margin: 10px 0 5px;
}

.product p {
  color: #666;
}

.product a {
  display: inline-block;
  background: #007bff;
  color: #fff;
  padding: 8px 12px;
  border-radius: 5px;
  text-decoration: none;
  margin-top: 8px;
}

.product a:hover {
  background: #0056b3;
}

/* ======== Tableaux ======== */
table {
  border-collapse: collapse;
  width: 100%;
  background: #fff;
  margin-top: 20px;
}

th, td {
  border: 1px solid #ddd;
  padding: 10px;
}

th {
  background: #f0f0f0;
  //text-align: left;
}

/* ======== Boutons ======== */
button, input[type="submit"] {
  background: #28a745;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 10px;
}

button:hover, input[type="submit"]:hover {
  background: #218838;
}

.but1 {
  background: green;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 10px;
  font-size: 15px;
}

.but1:hover {
  background: red;
}


.but2 {
  background: orange;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 10px;
  font-size: 15px;
}

.but2:hover {
  background: red;
}

.but3 {
  background: red;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 10px;
  font-size: 15px;
}

.but3:hover {
  background: orange;
}

/* --- Effet image hover produit --- */

.product-image {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease-in-out;
}

/* Image principale visible par défaut */
.product-image .img-main {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  opacity: 1;
}

/* Image secondaire cachée */
.product-image .img-hover {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  opacity: 0;
}

/* Au survol */
.product-image:hover .img-hover {
  transform: scale(1.05);
  opacity: 1;
}

.product-image:hover .img-main {
  opacity: 0;
}

label_i {
    display: inline-block;
    width: 100px; /* Largeur fixe pour aligner les débuts d'inputs */
    text-align: right; /* Aligne le texte du label à droite */
    margin-right: 10px;
  }


/* ======== Footer ======== */
footer {
  background: lightgray;
  color: #aaa;
  text-align: center;
  padding: 15px;
  margin-top: 40px;
}

/* ======== Formulaires ======== */
input, select, textarea {
  width: 100%;
  padding: 8px;
  margin: 6px 0;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}
