/* PAGE GESTION PLATS CUISINIER */

.chef-plats-main {
  min-height: 100vh;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  padding: 90px 20px 40px;
}

.chef-plats-container {
  max-width: 1400px;
  margin: 0 auto;
}

/* Header */
.page-header {
  text-align: center;
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: 36px;
  font-weight: 800;
  color: #1a1a1a;
  margin: 0 0 12px;
}

.page-header p {
  font-size: 16px;
  color: #666;
  margin: 0;
}

/* Actions rapides */
.quick-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  align-items: center;
}

.btn-action {
  padding: 14px 24px;
  border: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 138, 0, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, #55efc4 0%, #00b894 100%);
  color: white;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 184, 148, 0.4);
}

.btn-warning {
  background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
  color: #2d3436;
}

.btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(253, 203, 110, 0.4);
}

.btn-secondary {
  background: #f8f9fa;
  color: #666;
  border: 2px solid #e9ecef;
}

.btn-secondary:hover {
  background: #e9ecef;
  color: #1a1a1a;
}

.search-box {
  flex: 1;
  min-width: 250px;
  max-width: 400px;
}

.search-box input {
  width: 100%;
  padding: 14px 20px;
  border: 2px solid #e9ecef;
  border-radius: 50px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(255, 138, 0, 0.1);
}

/* Filtres et Stats */
.plats-filters-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  margin-bottom: 32px;
  gap: 20px;
  flex-wrap: wrap;
}

.filters-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 12px 20px;
  border: 2px solid #e9ecef;
  background: white;
  border-radius: 50px;
  font-weight: 600;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  border-color: var(--primary);
  color: white;
}

.filter-count {
  background: rgba(0, 0, 0, 0.1);
  padding: 2px 8px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
}

.filter-btn.active .filter-count {
  background: rgba(255, 255, 255, 0.3);
}

.stats-mini {
  display: flex;
  gap: 24px;
}

.stat-mini {
  text-align: center;
}

.stat-mini-value {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
}

.stat-mini-label {
  display: block;
  font-size: 12px;
  color: #666;
  font-weight: 600;
}

/* Grille de plats */
.plats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.plat-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
}

.plat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.plat-card.inactive {
  opacity: 0.6;
}

.plat-card.inactive::after {
  content: '⏸️ INACTIF';
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 6px 12px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  z-index: 2;
}

.plat-card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.plat-card-content {
  padding: 20px;
}

.plat-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.plat-card-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
  flex: 1;
}

.plat-card-price {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  margin-left: 12px;
}

.plat-card-category {
  display: inline-block;
  padding: 4px 12px;
  background: #f8f9fa;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  color: #666;
  margin-bottom: 12px;
}

.plat-card-description {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.plat-card-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #666;
}

.plat-card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.plat-card-delivery {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}

.plat-card-delivery.yes {
  background: #d5f4e6;
  color: #00b894;
}

.plat-card-delivery.no {
  background: #ffe8e8;
  color: #d63031;
}

.plat-card-delivery.conditional {
  background: #fff3cd;
  color: #e17055;
}

.plat-card-actions {
  display: flex;
  gap: 8px;
}

.plat-card-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.plat-card-btn-toggle {
  background: #f8f9fa;
  color: #666;
}

.plat-card-btn-toggle.active {
  background: #55efc4;
  color: #00b894;
}

.plat-card-btn-toggle:hover {
  transform: translateY(-2px);
}

.plat-card-btn-edit {
  background: #74b9ff;
  color: white;
}

.plat-card-btn-edit:hover {
  background: #0984e3;
  transform: translateY(-2px);
}

.plat-card-btn-delete {
  background: #ff7675;
  color: white;
}

.plat-card-btn-delete:hover {
  background: #d63031;
  transform: translateY(-2px);
}

/* État vide */
.plats-empty {
  text-align: center;
  padding: 80px 20px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.empty-icon {
  font-size: 80px;
  margin-bottom: 20px;
  opacity: 0.3;
}

.plats-empty h3 {
  font-size: 22px;
  color: #1a1a1a;
  margin: 0 0 12px;
}

.plats-empty p {
  font-size: 16px;
  color: #666;
  margin: 0 0 24px;
}

/* Modal */
.modal-plat {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.modal-plat.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.modal-plat-content {
  background: white;
  border-radius: 16px;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

.modal-plat-header {
  padding: 24px;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: white;
  z-index: 1;
}

.modal-plat-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
}

.modal-plat-close {
  background: none;
  border: none;
  font-size: 32px;
  color: #666;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.modal-plat-close:hover {
  background: #f8f9fa;
  color: #1a1a1a;
}

.modal-plat-body {
  padding: 24px;
}

/* Form */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(255, 138, 0, 0.1);
}

.form-group textarea {
  resize: vertical;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radio-label,
.checkbox-label {
  display: flex;
  align-items: center;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.radio-label:hover,
.checkbox-label:hover {
  background: #e9ecef;
}

.radio-label input[type="radio"] {
  margin-right: 12px;
}

.form-group input[type="checkbox"] {
  margin-right: 8px;
}

/* Photo Upload */
.photo-upload-area {
  position: relative;
  border: 2px dashed #e9ecef;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.photo-upload-area:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.photo-upload-area.drag-active {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.photo-preview {
  position: relative;
  margin-bottom: 16px;
}

.photo-preview img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 8px;
}

.photo-remove {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(214, 48, 49, 0.9);
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.photo-remove:hover {
  background: #d63031;
  transform: scale(1.1);
}

.photo-placeholder-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.photo-placeholder p {
  margin: 0 0 8px;
  font-weight: 600;
  color: #1a1a1a;
}

.photo-placeholder-hint {
  font-size: 12px !important;
  color: #666 !important;
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e9ecef;
}

.form-actions button {
  flex: 1;
  padding: 14px 24px;
  border: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .chef-plats-main {
    padding: 80px 10px 40px;
  }

  .page-header h1 {
    font-size: 28px;
  }

  .quick-actions {
    flex-direction: column;
  }

  .btn-action,
  .search-box {
    width: 100%;
  }

  .plats-filters-stats {
    flex-direction: column;
  }

  .filters-group {
    width: 100%;
    justify-content: center;
  }

  .plats-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column;
  }
}
