*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ======================
   BASE
====================== */

body {
  font-family: Arial, sans-serif;
  margin: 20px;
  line-height: 1.4;
}

.logo {
  height: 120px;
  width: auto;
  flex-shrink: 0;
  margin-bottom: 25px;
}

/* ======================
   GRILLE PRODUITS
====================== */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  align-items: stretch;
}

figure {
  margin: 0;
  border: 1px solid #e1e1e1;
  border-radius: 10px;
  padding: 8px;
  background: #fff;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.thumb {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
}

.thumb img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  border-radius: 10px;
}

figcaption {
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  background: #f2f2f2;
  width: 100%;
  padding: 6px;
  margin: 0 0 6px 0;
  border-radius: 8px;

  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

/* ======================
   TEXTE / ÉTATS
====================== */

.muted {
  color: #666;
  font-size: 13px;
}

.missing {
  font-size: 12px;
  color: #c00;
  margin-top: 8px;
}

.stock {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

/* ======================
   TAILLES
====================== */

.size {
  display: flex;
  align-items: center;
  margin-top: 4px;
}

.size select {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 12px;
}

/* ======================
   PRIX
====================== */

.price {
  margin-top: auto;
  padding: 6px 0 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.price-label {
  font-size: 11px;
  font-weight: 600;
  color: #555;
}

.price-amount {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  font-weight: 800;
  color: #333;
}

.price-amount .int {
  font-size: 26px;
}

.price-amount .dec {
  font-size: 13px;
  position: relative;
  top: 2px;
}

.price-amount .eur {
  font-size: 13px;
  font-weight: 700;
  color: #444;
  position: relative;
  top: 10px;
}

/* ======================
   HEADER
====================== */

header.top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 25px;
}

#app {
  margin-top: 12px;
}

/* ======================
   VARIABLES CATÉGORIES
====================== */

:root {
  --cat-gap: 6px;
}

.catButtons {
  display: flex;
  gap: var(--cat-gap);
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 14px 0;
  width: 100%;

  border-top: 1px solid rgba(198, 160, 74, 0.25);
  border-bottom: 1px solid rgba(158, 124, 50, 0.45);
}


/* ======================
   BOUTONS CATÉGORIES
====================== */

.catBtn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 10px 14px;
  min-height: 130px;

  background: transparent;
  border: none;
  border-radius: 0;

  cursor: pointer;
  flex: 0 0 auto;
}

/* CADRE UNIFORME */
.catBtn .catIcon {
  width: 72px;
  height: 72px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #f6f6f6;
  border-radius: 50%;

  border: 1.5px solid #c6a04a;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.70) inset,
    0 1px 2px rgba(255, 255, 255, 0.35),
    0 1px 4px rgba(158, 124, 50, 0.55);
}

.catBtn:hover .catIcon {
  border-color: #d4b05c;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.70) inset,
    0 2px 6px rgba(158, 124, 50, 0.75);
}


.catBtn .catIcon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  /* coupe l'image au cercle */
  display: flex;
  align-items: center;
  justify-content: center;

  background: #fff;
  border: 2px solid #c9a86a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .15);

  margin-bottom: 6px;
}

/* IMAGE QUI REMPLIT PARFAITEMENT LE ROND */
.catBtn .catIcon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* remplit le cercle */
  border-radius: 50%;
  /* sécurité */
  display: block;
}

.catBtn span {
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  color: #222;
  margin-top: 2px;
}

.catBtn.active .catIcon {
  border-color: #9e7c32;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.70) inset,
    0 2px 8px rgba(158, 124, 50, 0.9);
}

.catBtn.active span {
  color: #000;
}


/* ======================
   SELECT MOBILE
====================== */

.catSelect {
  display: none;
  width: 100%;
  max-width: 360px;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
}

/* ======================
   RESPONSIVE
====================== */

@media (max-width: 700px) {
  .logo {
    height: 70px;
  }

  .catButtons {
    display: none;
  }

  .catSelect {
    display: block;
  }
}