
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #ffffff;
  color: #222;
  line-height: 1.5;
  padding: 2rem 1.5rem 3rem;
}

/* En-tête */

header {
  text-align: center;
  margin-bottom: 1.8rem;
}

h1 {
  font-size: 2rem;
  margin-bottom: 0.3rem;
  font-weight: 600;
}

.subtitle {
  font-size: 0.95rem;
  color: #666;
}

/* Bouton retour */

.back-portfolio {
  text-align: left;
  margin-bottom: 1.8rem;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.back-portfolio a {
  font-size: 0.9rem;
  text-decoration: none;
  color: #3a3a3c;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #e5e5e5;
  background-color: #ffffff;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.back-portfolio a:hover {
  background-color: #f3f4f6;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  transform: translateY(-1px);
  color: #111;
}

/* Grille des produits */

.routine-grid {
  max-width: 1100px;
  margin: 0 auto 1.8rem;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.2rem;
}

/* Carte d'une étape */

.step {
  background-color: #fafafa;
  border-radius: 16px;
  padding: 0.8rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.25s ease, transform 0.2s ease;
  cursor: pointer;
}

.step:hover {
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* Wrapper pour l'image */

.image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
  background-color: #fff;
}

.product-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* image par défaut : noir et blanc */
.img-bw {
  opacity: 1;
}

/* image couleur cachée au départ */
.img-color {
  opacity: 0;
  transform: scale(1);
}

/* Quand la carte est active */
.step.active .img-bw {
  opacity: 0;
}

.step.active .img-color {
  opacity: 1;
  transform: scale(1.06); /* petit zoom */
}

/* Panneau d'information */

.info-panel {
  max-width: 900px;
  margin: 0 auto 0;
  background-color: #ffffff;
  border-radius: 16px;
  border: 1px solid #e5e5e5;
  padding: 1rem 1.2rem;
  box-shadow: 0 8px 22px rgba(0,0,0,0.06);
  min-height: 110px;
}

#info-title {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

#info-text {
  font-size: 0.93rem;
  color: #555;
}

/* Quiz */

.quiz {
  max-width: 1100px;
  margin: 3rem auto 0;
  padding: 2rem;
  border: 1px solid #e0e0e0;
  border-radius: 14px;
  background: #fafafa;
  text-align: center;
}

.quiz h2 {
  margin-top: 0;
  margin-bottom: 0.6rem;
  color: #c47cb0;
  font-size: 1.4rem;
}

.quiz-instruction {
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.quiz-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 1.2rem 0;
}

.quiz-buttons button {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #d9b6cf;
  background: white;
  cursor: pointer;
  transition: 0.2s;
  font-size: 0.9rem;
  font-weight: 400;
}

.quiz-buttons button:hover {
  background: #f9e9f3;
  transform: translateY(-2px);
}

.quiz-buttons button.correct {
  background: #d0f5e0;
  border-color: #86c79a;
}

.quiz-buttons button.wrong {
  background: #ffe0e7;
  border-color: #ffabc3;
}

.feedback {
  margin-top: 1rem;
  font-weight: 500;
  color: #7a5c75;
}