* { box-sizing: border-box; }

[hidden] { display: none !important; }

/* --- Barre de navigation --- */
.barre {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 24px;
  background: #2b2e31;
}

.barre a {
  color: #e6e6e6;
  text-decoration: none;
}

.barre a:hover { text-decoration: underline; }

.barre .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
  font-size: 1.35rem;
  color: white;
  margin-right: auto;
}

.barre .logo img {
  width: 40px;
  height: 40px;
}

.barre .logo .tri { color: #5fc58a; }

.barre .logo:hover { text-decoration: none; }

/* --- Catalogue des produits --- */
.grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  width: 100%;
}

.carte {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.carte:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.vignette {
  width: 100%;
  aspect-ratio: 1;
  background: #fafafa;
  border-radius: 6px;
  margin-bottom: 12px;
}

.carte h2 { font-size: 1.1rem; margin: 0 0 4px; }
.carte p { margin: 0 0 12px; color: #555; flex: 1; }
.carte .a-partir { color: #555; margin-bottom: 12px; }

.carte .bouton {
  text-align: center;
  padding: 8px;
  border-radius: 6px;
  background: #2e7d32;
  color: white;
}

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: #f2f4f3;
  color: #222;
}

header {
  padding: 20px 24px 8px;
}

header h1 { margin: 0 0 4px; }
header p { margin: 0; color: #555; }

main {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 24px;
}

.panneau, .apercu {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.panneau {
  flex: 1 1 280px;
  max-width: 380px;
}

.panneau h2 {
  font-size: 1.1rem;
  margin: 0 0 12px;
}

.panneau h2:not(:first-child) { margin-top: 24px; }

.controle {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.controle.case {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.controle input[type="range"] { width: 100%; }

.controle label span { font-weight: bold; }

.controle input[type="text"] {
  padding: 6px 8px;
  font-size: 1rem;
}

.graduations {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #666;
  padding: 0 4px;
}

.controle small { color: #555; }

.apercu {
  flex: 2 1 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#dessin {
  width: 100%;
  max-width: 480px;
  height: auto;
  background: #fafafa;
  border-radius: 6px;
}

#animer {
  margin-top: 6px;
  padding: 8px 12px;
  border: 1px solid #2e7d32;
  border-radius: 6px;
  background: white;
  color: #2e7d32;
  font-size: 0.95rem;
  cursor: pointer;
}

#animer:hover { background: #eef6ee; }

.resume {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 16px 0;
  justify-content: center;
}

.resume div {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.resume span { color: #666; font-size: 0.9rem; }
.resume strong { font-size: 1.3rem; }

#commander {
  padding: 10px 20px;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  background: #2e7d32;
  color: white;
  cursor: pointer;
}

#commander:hover { background: #256528; }
