/* Kunthea Snack Express — Main CSS */
:root {
  --primary: #8DED55;
  --primary-hover: #6dcf3e;
  --primary-text: #1a1a1a;   /* texte sur fond vert : noir pour lisibilité */
  --secondary: #2d6a4f;
  --accent: #52b788;
  --bg-light: #f4fef0;
  --card-radius: 12px;
}

/* --- HERO --- */
.hero-section {
  background: linear-gradient(135deg, #8DED55 0%, #52b788 60%, #2d6a4f 100%);
  min-height: 420px;
  padding: 3rem 0;
}

.alert-table {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  backdrop-filter: blur(4px);
}

/* --- WAIT BADGE --- */
.wait-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  padding: .5rem 1.5rem;
  border-radius: 50px;
  backdrop-filter: blur(4px);
}

/* --- CATEGORY CARDS --- */
.category-card {
  background: white;
  border: 2px solid transparent;
  transition: all .2s ease;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.category-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(230,57,70,.15);
}

/* --- PRODUCT CARDS --- */
.product-card {
  border-radius: var(--card-radius);
  border: 1px solid rgba(0,0,0,.08);
  transition: box-shadow .2s ease, transform .2s ease;
  overflow: hidden;
}
.product-card:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,.12);
  transform: translateY(-2px);
}
.product-img {
  height: 180px;
  object-fit: cover;
  width: 100%;
}
.unavailable-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- CART --- */
.list-group-item { border-left: 3px solid transparent; transition: border-color .15s; }
.list-group-item:hover { border-left-color: var(--primary); }

/* --- CATEGORY TABS --- */
.category-tabs { white-space: nowrap; }

/* --- QUANTITY INPUT --- */
.quantity-input .form-control { font-size: 1rem; font-weight: 600; }

/* --- ORDER STATUS TIMELINE --- */
.status-timeline {
  display: flex;
  justify-content: space-between;
  position: relative;
  padding: 1rem 0;
}
.status-timeline::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 10%;
  right: 10%;
  height: 3px;
  background: #dee2e6;
  z-index: 0;
}
.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  flex: 1;
}
.timeline-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #dee2e6;
  color: #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  margin-bottom: .5rem;
}
.timeline-step.active .timeline-icon {
  background: var(--primary);
  color: white;
  transform: scale(1.15);
}
.timeline-step.done .timeline-icon {
  background: #28a745;
  color: white;
}
.timeline-label {
  font-size: .75rem;
  text-align: center;
  font-weight: 600;
  color: #6c757d;
}
.timeline-step.active .timeline-label { color: var(--primary); }
.timeline-step.done .timeline-label { color: #28a745; }

/* --- READY ALERT --- */
.ready-alert {
  animation: readyPulse 1.5s ease-in-out infinite;
}
@keyframes readyPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(40,167,69,.4); }
  50% { box-shadow: 0 0 0 15px rgba(40,167,69,0); }
}

/* --- PAYMENT CARD HOVER --- */
.card-hover {
  transition: all .2s;
  cursor: pointer;
}
.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
}

/* --- RESPONSIVE FIXES --- */
@media (max-width: 576px) {
  .hero-section { min-height: 300px; }
  .product-img { height: 140px; }
  .category-card { padding: .75rem !important; }
  .status-timeline { overflow-x: auto; }
}

/* --- WAIT COUNTER --- */
.wait-counter {
  background: linear-gradient(135deg, #2d6a4f 0%, #52b788 100%);
  border-radius: 16px;
  padding: 1.25rem 1rem 1rem;
  color: white;
  text-align: center;
  box-shadow: 0 4px 20px rgba(29,53,87,.25);
}

.wait-counter__grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin-bottom: .75rem;
}

.wait-counter__block {
  flex: 1;
  padding: .25rem .5rem;
}

.wait-counter__sep {
  width: 1px;
  height: 60px;
  background: rgba(255,255,255,.25);
  margin: 0 .5rem;
  flex-shrink: 0;
}

.wait-counter__icon {
  font-size: 1.4rem;
  line-height: 1;
  margin-bottom: .15rem;
}

.wait-counter__value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.02em;
}

.wait-counter__mins,
.wait-counter__secs {
  display: inline-block;
}

.wait-counter__unit {
  opacity: .6;
  margin: 0 1px;
}

.wait-counter__secs {
  font-size: 1.4rem;
  opacity: .85;
}

.wait-counter__label {
  font-size: .72rem;
  opacity: .75;
  margin-top: .1rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.wait-counter__sublabel {
  font-size: .75rem;
  opacity: .9;
  margin-top: .15rem;
  font-style: italic;
}

/* Barre de progression */
.wait-counter__progress-wrap {
  background: rgba(255,255,255,.15);
  border-radius: 99px;
  height: 6px;
  overflow: hidden;
  margin: .25rem .5rem .4rem;
}

.wait-counter__progress-bar {
  height: 100%;
  background: #f4a261;
  border-radius: 99px;
  transition: width 1s linear;
}

.wait-counter__progress-bar--low {
  background: #8DED55;
  animation: progressPulse .8s ease-in-out infinite alternate;
}

@keyframes progressPulse {
  from { opacity: 1; }
  to   { opacity: .6; }
}

.wait-counter__progress-label {
  font-size: .72rem;
  opacity: .7;
  margin-top: .15rem;
}

/* État : prête */
.wait-counter--done {
  background: linear-gradient(135deg, #155724 0%, #28a745 100%);
  border-radius: 16px;
  padding: 1.25rem;
  color: white;
  text-align: center;
  box-shadow: 0 4px 20px rgba(40,167,69,.3);
  animation: readyGlow 1.5s ease-in-out infinite;
}

.wait-counter__ready {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
}

.wait-counter__ready-icon {
  font-size: 2.5rem;
  animation: bellShake .6s ease-in-out infinite alternate;
}

@keyframes bellShake {
  from { transform: rotate(-12deg); }
  to   { transform: rotate(12deg); }
}

.wait-counter__ready-text {
  font-size: 1.15rem;
  font-weight: 700;
}

.wait-counter__done-text,
.wait-counter__cancelled {
  font-size: 1rem;
  padding: .75rem;
}

@keyframes readyGlow {
  0%, 100% { box-shadow: 0 4px 20px rgba(40,167,69,.3); }
  50%       { box-shadow: 0 4px 35px rgba(40,167,69,.65); }
}

/* --- UTILITIES --- */
.navbar { box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.bg-primary { background-color: var(--primary) !important; color: var(--primary-text) !important; }
.btn-primary { background-color: var(--primary); border-color: var(--primary); color: var(--primary-text); font-weight: 600; }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active { background-color: var(--primary-hover); border-color: var(--primary-hover); color: var(--primary-text); }
.text-primary { color: var(--secondary) !important; }
.border-primary { border-color: var(--primary) !important; }
/* Outline primary */
.btn-outline-primary { color: var(--secondary); border-color: var(--primary); }
.btn-outline-primary:hover { background-color: var(--primary); border-color: var(--primary); color: var(--primary-text); }
