/* Modal Styles for Fiches - Now using identical structure to sheetModal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  z-index: 999;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show {
  opacity: 1;
}

.modal-box {
  background: #fff;
  width: 95%;
  max-width: 1200px;
  max-height: 90vh;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.show .modal-box {
  transform: scale(1);
}

/* Header section */
.modal-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.2);
}

.modal-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e293b;
}

.modal-header p {
  font-size: 0.75rem;
  color: #334155;
  margin-top: 0.125rem;
}

.close {
  font-size: 2rem;
  cursor: pointer;
  color: #334155;
  transition: all 0.3s ease;
}

.close:hover {
  color: #1e293b;
}

/* Content section */
.modal-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
}

.modal-image-container {
  width: 100%;
  height: 75vh;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.modal-image-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.description {
  font-size: 0.875rem;
  color: #334155;
  margin-bottom: 1.5rem;
}

.elements-section {
  margin-bottom: 1.5rem;
}

.elements-section h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.75rem;
}

.elements-section ul {
  list-style-type: none;
  padding: 0;
}

.elements-section li {
  padding: 0.5rem 0;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.elements-section li .arrow-bullet,
#sheetSteps li .arrow-bullet {
  font-size: 0.875rem;
  flex-shrink: 0;
}

/* Footer section */
.modal-footer {
  flex-shrink: 0;
  padding: 0.75rem 1.5rem;
  background: #f8fafc;
  border-top: 1px solid rgba(15, 23, 42, 0.1);
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: white;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 12px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  box-shadow: 0 4px 6px rgba(15, 23, 42, 0.25);
  width: 100%;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #6d28d9);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(15, 23, 42, 0.35);
}

/* Mobile */
@media (max-width: 768px) {
  .modal-box {
    width: 100%;
    height: 95vh;
    max-height: 95vh;
    border-radius: 0;
  }
  
  .modal-image-container {
    height: 60vh;
  }
  
  .modal-footer {
    padding: 1rem;
  }
}