/* ============================================================
   Gestion carte — Encas Créole 83
   ============================================================ */

body { overflow: auto; }

.produits-main {
  padding: 20px 16px 60px;
  max-width: 1100px;
  margin: 0 auto;
}

/* ── États ───────────────────────────────────────────────────── */
.produits-chargement,
.produits-non-auth {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 60vh;
  color: var(--texte-2);
  font-size: 0.95rem;
}

@keyframes tourner { to { transform: rotate(360deg); } }
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--surface-2);
  border-top-color: var(--piment);
  border-radius: 50%;
  animation: tourner 0.8s linear infinite;
}

/* ── Catégories ──────────────────────────────────────────────── */
.cat-section { margin-bottom: 36px; }

.cat-titre {
  font-family: var(--f-display);
  font-size: 1.1rem;
  color: var(--soleil);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--bord-fort);
}

/* ── Grille ──────────────────────────────────────────────────── */
.produits-grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

/* ── Card produit ────────────────────────────────────────────── */
.prod-card {
  background: var(--surface);
  border: 1px solid var(--bord-fort);
  border-radius: var(--rayon);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--tr);
}

.prod-card[data-dispo="false"] { opacity: 0.55; }

/* Image */
.prod-img-wrap {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--surface-2);
  overflow: hidden;
}

.prod-img-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.prod-img-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--texte-2);
  font-size: 0.72rem;
}

.btn-photo-label {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 12px;
  background: rgba(20, 18, 16, 0.85);
  border: 1px solid var(--bord-fort);
  border-radius: 100px;
  color: var(--texte);
  font-family: var(--f-body);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background var(--tr);
}
.btn-photo-label:hover { background: var(--surface-3); }

.input-photo { display: none; }

/* Info */
.prod-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prod-nom {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--texte);
  line-height: 1.3;
}

.prod-prix {
  font-family: var(--f-display);
  font-size: 1rem;
  color: var(--texte);
}

/* Bouton disponibilité */
.btn-dispo {
  padding: 8px;
  border-radius: var(--rayon-sm);
  border: 1px solid;
  font-family: var(--f-body);
  font-size: 0.78rem;
  font-weight: 700;
  width: 100%;
  min-height: 38px;
  transition: background var(--tr), opacity var(--tr);
}
.btn-dispo:disabled { opacity: 0.4; cursor: not-allowed; }

.dispo-oui {
  background: rgba(31, 168, 92, .12);
  border-color: var(--canne);
  color: var(--canne);
}
.dispo-oui:hover { background: rgba(31, 168, 92, .22); }

.dispo-non {
  background: rgba(230, 62, 44, .12);
  border-color: var(--piment);
  color: var(--piment);
}
.dispo-non:hover { background: rgba(230, 62, 44, .22); }

/* ── Toast ───────────────────────────────────────────────────── */
.toast-produits {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 20px;
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 700;
  z-index: 100;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.toast-ok     { background: var(--canne);    color: #fff; }
.toast-erreur { background: var(--piment);   color: #fff; }
.toast-info   { background: var(--surface-3); color: var(--texte); border: 1px solid var(--bord-fort); }
